{
 "cells": [
  {
   "cell_type": "code",
   "execution_count": 256,
   "id": "77e67ffe",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "Looking in indexes: http://mirrors.aliyun.com/pypi/simple/\n",
      "Collecting textfsm\n",
      "  Downloading http://mirrors.aliyun.com/pypi/packages/f8/f2/235703136dc9f25d1498c0f0b49ed99a4d7f98c361f322a5da586eb1ee06/textfsm-1.1.3-py2.py3-none-any.whl (44 kB)\n",
      "     -------------------------------------- 44.7/44.7 kB 200.1 kB/s eta 0:00:00\n",
      "Collecting future\n",
      "  Downloading http://mirrors.aliyun.com/pypi/packages/8f/2e/cf6accf7415237d6faeeebdc7832023c90e0282aa16fd3263db0eb4715ec/future-0.18.3.tar.gz (840 kB)\n",
      "     ------------------------------------ 840.9/840.9 kB 209.3 kB/s eta 0:00:00\n",
      "  Preparing metadata (setup.py): started\n",
      "  Preparing metadata (setup.py): finished with status 'done'\n",
      "Requirement already satisfied: six in d:\\program files (x86)\\thonny\\lib\\site-packages (from textfsm) (1.16.0)\n",
      "Building wheels for collected packages: future\n",
      "  Building wheel for future (setup.py): started\n",
      "  Building wheel for future (setup.py): finished with status 'done'\n",
      "  Created wheel for future: filename=future-0.18.3-py3-none-any.whl size=492055 sha256=463ec9aeaa9b4fead206f53f0423663c5db85d87acb7574899f5573fa64bdbd0\n",
      "  Stored in directory: c:\\users\\administrator\\appdata\\local\\pip\\cache\\wheels\\6e\\54\\16\\2ab500319d13efeeee4b2007aab5a01589dc775fb1a1f617c5\n",
      "Successfully built future\n",
      "Installing collected packages: future, textfsm\n",
      "Successfully installed future-0.18.3 textfsm-1.1.3\n",
      "Note: you may need to restart the kernel to use updated packages.\n"
     ]
    },
    {
     "name": "stderr",
     "output_type": "stream",
     "text": [
      "  WARNING: The scripts futurize.exe and pasteurize.exe are installed in 'D:\\Program Files (x86)\\Thonny\\Scripts' which is not on PATH.\n",
      "  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.\n",
      "  WARNING: The script textfsm.exe is installed in 'D:\\Program Files (x86)\\Thonny\\Scripts' which is not on PATH.\n",
      "  Consider adding this directory to PATH or, if you prefer to suppress this warning, use --no-warn-script-location.\n",
      "\n",
      "[notice] A new release of pip available: 22.3.1 -> 23.0.1\n",
      "[notice] To update, run: python.exe -m pip install --upgrade pip\n"
     ]
    }
   ],
   "source": [
    "pip install textfsm"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 1,
   "id": "8b25e382",
   "metadata": {},
   "outputs": [],
   "source": [
    " \n",
    "import telnetlib\n",
    "from textfsm import TextFSM\n",
    "import re,json\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "9e002723",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 2,
   "id": "8ae9e5d7",
   "metadata": {
    "scrolled": true
   },
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'交换机列表': [{'type': 'hw.s3700',\n",
       "   'name': '3700',\n",
       "   'ip': '192.168.11.1',\n",
       "   'user': 'admin',\n",
       "   'passwd': 'wsf2010'},\n",
       "  {'type': 'h3c.s5560s',\n",
       "   'name': '5560',\n",
       "   'ip': '192.168.11.205',\n",
       "   'user': 'admin',\n",
       "   'passwd': 'wsf119900'},\n",
       "  {'type': 'h3c.s1850',\n",
       "   'name': 'lou7',\n",
       "   'ip': '192.168.11.202',\n",
       "   'user': 'admin',\n",
       "   'passwd': 'wsf119900'},\n",
       "  {'type': 'h3c.s1850',\n",
       "   'name': 'lou3',\n",
       "   'ip': '192.168.11.203',\n",
       "   'user': 'admin',\n",
       "   'passwd': 'wsf119900'},\n",
       "  {'type': 'rg.nbs5552xg',\n",
       "   'name': 'rg552',\n",
       "   'ip': '192.168.11.200',\n",
       "   'user': 'wsf2010',\n",
       "   'passwd': 'wsf2010'}],\n",
       " '输出路径': './'}"
      ]
     },
     "execution_count": 2,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "def readCfg(filename):\n",
    "    \"\"\"读取配置文件\"\"\"\n",
    "    # 读取json文件内容,返回字典格式\n",
    "    json_data = {}\n",
    "    with open(filename,'r',encoding='utf8')as fp:\n",
    "        json_data = json.load(fp)\n",
    "    return json_data\n",
    "cfg = readCfg('sw_config.json')\n",
    "cfg"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 3,
   "id": "8cb96c0a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "{'type': 'h3c.s1850',\n",
       " 'name': 'lou7',\n",
       " 'ip': '192.168.11.202',\n",
       " 'user': 'admin',\n",
       " 'passwd': 'wsf119900'}"
      ]
     },
     "execution_count": 3,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\n",
    "\n",
    "one = cfg['交换机列表'][2]\n",
    "one"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 4,
   "id": "c9727b85",
   "metadata": {},
   "outputs": [],
   "source": [
    "host=one['ip']\n",
    " \n",
    "password1=one['passwd']"
   ]
  },
  {
   "cell_type": "raw",
   "id": "1cec9a5c",
   "metadata": {},
   "source": [
    "\n",
    "\n",
    "tn=telnetlib.Telnet(host)\n",
    "tn.read_until(b\"login:\")#//读取到\n",
    "\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "88083278",
   "metadata": {},
   "source": [
    "### 任意读取"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 31,
   "id": "01e1ac8a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "' \\r\\n<lou7>'"
      ]
     },
     "execution_count": 31,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\n",
    "\n",
    "out = tn.read_very_eager().decode('ascii')#读取缓冲区内的数据不等待  //  \\r\\r\\n---- More ---- \n",
    "tn.write(' '.encode('ascii')+b\"\\n\" )\n",
    "out"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 32,
   "id": "4ac686b1",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " \r\n",
      "<lou7>\n"
     ]
    }
   ],
   "source": [
    "print(out)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 34,
   "id": "81178b48",
   "metadata": {},
   "outputs": [],
   "source": [
    "def save2file(s,fileNmae):\n",
    "    \"\"\" 把str 存入文件 \"\"\"\n",
    "    with open(fileNmae, \"w\", encoding='utf-8') as f:\n",
    "        f.write(str(s))\n",
    "        f.close()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 35,
   "id": "d0f975fd",
   "metadata": {},
   "outputs": [],
   "source": [
    "save2file(out,'a.txt')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "46befae6",
   "metadata": {},
   "outputs": [],
   "source": [
    "tn.write(one['user'].encode('ascii') )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 12,
   "id": "fb4037f3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "b'wsf119900'"
      ]
     },
     "execution_count": 12,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "tn.read_until(b\"Password:\",timeout=5)#//读取到\n",
    "\n",
    "\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 77,
   "id": "e80cd0ff",
   "metadata": {},
   "outputs": [],
   "source": [
    "tn.write(' '.encode('ascii')+b\"\\n\" )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 23,
   "id": "e0467f07",
   "metadata": {},
   "outputs": [],
   "source": [
    "tn.write(b\"display current-configuration\\n\")"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "f29407f7",
   "metadata": {},
   "source": [
    "## 预期读"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 75,
   "id": "ead5a27e",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(0,\n",
       " <re.Match object; span=(1881, 1895), match=b'---- More ----'>,\n",
       " b'\\r\\r               \\r192.168.34.79   f4b5-2024-f44c 34         GE1/0/11                 5     D    \\r\\r\\n192.168.34.81   f4b5-2024-ebaf 34         GE1/0/11                 20    D    \\r\\r\\n192.168.34.82   00e0-0b48-a717 34         GE1/0/11                 5     D    \\r\\r\\n192.168.34.90   00e0-7070-de71 34         GE1/0/11                 19    D    \\r\\r\\n192.168.34.102  e0d5-5efc-0d5f 34         GE1/0/11                 12    D    \\r\\r\\n192.168.34.111  f4b5-2024-f365 34         GE1/0/11                 9     D    \\r\\r\\n192.168.34.117  0c9d-920f-c668 34         GE1/0/11                 7     D    \\r\\r\\n192.168.34.121  408d-5cfd-e739 34         GE1/0/11                 18    D    \\r\\r\\n192.168.34.144  b42e-9944-2e6e 34         GE1/0/11                 5     D    \\r\\r\\n192.168.34.147  a85e-45a0-0b0e 34         GE1/0/11                 5     D    \\r\\r\\n192.168.34.150  6045-cb7f-c902 34         GE1/0/11                 5     D    \\r\\r\\n192.168.34.155  b42e-991d-4210 34         GE1/0/11                 20    D    \\r\\r\\n192.168.34.158  00e0-4f03-c582 34         GE1/0/11                 19    D    \\r\\r\\n192.168.34.166  7405-a563-fba3 34         GE1/0/11                 5     D    \\r\\r\\n192.168.34.174  081f-7150-30de 34         GE1/0/11                 5     D    \\r\\r\\n192.168.34.176  00e0-4c85-826d 34         GE1/0/11                 19    D    \\r\\r\\n192.168.34.180  f4b5-2024-f19b 34         GE1/0/11                 20    D    \\r\\r\\n192.168.34.188  b42e-997a-2550 34         GE1/0/11                 5     D    \\r\\r\\n192.168.34.191  74d4-356d-891e 34         GE1/0/11                 5     D    \\r\\r\\n192.168.34.196  0840-f360-a0d8 34         GE1/0/11                 5     D    \\r\\r\\n192.168.34.206  7486-e218-0a99 34         GE1/0/11                 5     D    \\r\\r\\n192.168.34.212  7486-e218-1afe 34         GE1/0/11                 5     D    \\r\\r\\n192.168.34.254  5475-959c-548b 34         GE1/0/11                 19    D    \\r\\r\\n---- More ----')"
      ]
     },
     "execution_count": 75,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\n",
    "outs = tn.expect([b\"---- More ----\"],timeout=2) \n",
    "outs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 74,
   "id": "91c4bc4f",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "-1 \n"
     ]
    }
   ],
   "source": [
    "#print(out)\n",
    "print(outs[0],outs[2].decode('utf-8'))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "35988479",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "b239ee7d",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "6a5ba8d4",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "ff19d712",
   "metadata": {},
   "outputs": [],
   "source": [
    "tn.write('display mac-addr '.encode('ascii')+b\"\\n\")"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 72,
   "id": "c73f4ed0",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(-1, None, b'')"
      ]
     },
     "execution_count": 72,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "outs = tn.expect([b\"\\\\x1b\\[0m All\\s+\",b\"---- More ----\"],timeout=5) \n",
    "outs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 5,
   "id": "3d7ef1ba",
   "metadata": {},
   "outputs": [],
   "source": [
    " \n",
    "\n",
    "def h3clogin(user,passwd,ip):\n",
    "    \"\"\"登入交换机 返回telnet\"\"\"\n",
    "    outLs = []\n",
    "    tn=telnetlib.Telnet(ip)\n",
    "    out = tn.read_until(b\"Username:\",timeout=5)\n",
    "    outLs.append(out)\n",
    "    #--输入用户名\n",
    "    tn.write(user.encode('ascii')+b\"\\n\")\n",
    "    out = tn.read_until(b\"Password:\",timeout=5)\n",
    "    outLs.append(out)\n",
    "    #--输入密码\n",
    "    tn.write(passwd.encode('ascii')+b\"\\n\")\n",
    "    outs = tn.expect([b\"<.*?>\"],timeout=5)##等待直到读到预期的值\n",
    "    outLs.append(outs[2])\n",
    "    ## ------\n",
    "    #print(outLs)\n",
    "    return tn\n",
    "\n",
    "\n",
    "    "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 6,
   "id": "e73a5e58",
   "metadata": {},
   "outputs": [],
   "source": [
    "tn = h3clogin(one['user'],one['passwd'],one['ip'])"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "f62ca867",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "edb3f261",
   "metadata": {},
   "outputs": [],
   "source": [
    " \n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 80,
   "id": "386d5c13",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "['display mac-addr \\r\\nMAC ADDR        VLAN ID  STATE           PORT INDEX                AGING TIME(s)\\r\\na85e-455a-5a7c  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8f79-1b53  1        Learned         GigabitEthernet1/0/23     AGING\\r\\ne0d5-5efc-0288  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n00e0-4c52-032d  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n40b0-765f-6e47  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n04f9-f816-6b61  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n7486-e218-1afe  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8f79-1b76  1        Learned         GigabitEthernet1/0/23     AGING\\r\\nfcaa-1470-f02e  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8f79-1b7a  1        Learned         GigabitEthernet1/0/23     AGING\\r\\nb42e-999d-1f99  1        Learned         GigabitEthernet1/0/24     AGING\\r\\ne062-90c9-1712  1        Learned         GigabitEthernet1/0/23     AGING\\r\\nf079-596c-908a  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n7486-e218-0a99  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n0017-6112-279e  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n4419-b649-85b6  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8fd5-da85  1        Learned         GigabitEthernet1/0/24     AGING\\r\\ne0d5-5ec3-191d  1        Learned         GigabitEthernet1/0/23     AGING\\r\\ne062-9082-2258  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n4cbd-8f2c-9597  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8f2c-9592  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8fd5-dab2  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n  ---- More ----',\n",
       " '\\x1b[16D                \\x1b[16D4cbd-8f79-1b2a  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n4cbd-8fd5-dab0  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n4cb0-0810-6c1e  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8f2c-9572  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n8811-96af-173e  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8f2c-957c  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n0017-6112-ab50  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n4419-b649-8575  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8fd3-2aa9  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n5cc9-99ea-55e0  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n4cbd-8fd5-da70  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8fd5-da71  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8fd5-da6e  1        Learned         GigabitEthernet1/0/23     AGING\\r\\ne062-90bb-c9b5  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n18c0-4d1b-c69e  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n00e0-4f03-c582  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n408d-5c1d-9e3e  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8f79-1b84  1        Learned         GigabitEthernet1/0/23     AGING\\r\\nc051-7ea4-099f  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n00e0-4d95-1326  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8f79-1b80  1        Learned         GigabitEthernet1/0/23     AGING\\r\\nf000-006c-8155  1        Learned         GigabitEthernet1/0/15     AGING\\r\\n807c-62bb-4e1e  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n  ---- More ----',\n",
       " '\\x1b[16D                \\x1b[16D5254-00d4-636c  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nca8d-10bb-62ab  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n2428-fddc-be9d  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nb42e-99e6-3c49  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf000-006c-8167  1        Learned         GigabitEthernet1/0/5      AGING\\r\\n309c-2365-209e  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n80fb-06c9-6db9  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n0c9d-92cc-8c94  1        Learned         GigabitEthernet1/0/24     AGING\\r\\ne0d5-5e51-ea27  1        Learned         GigabitEthernet1/0/23     AGING\\r\\nb42e-99ea-043c  1        Learned         GigabitEthernet1/0/24     AGING\\r\\ne0d5-5e56-7edb  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8fd5-dbd4  1        Learned         GigabitEthernet1/0/14     AGING\\r\\n8ce7-486e-bf80  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n0c9d-921b-267b  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nd263-05e0-8c23  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf4b5-2024-ef6b  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nb42e-9979-de61  1        Learned         GigabitEthernet1/0/24     AGING\\r\\ne0d5-5efa-1b79  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n44a6-42b6-c0a3  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf4b5-2024-f365  1        Learned         GigabitEthernet1/0/23     AGING\\r\\nb42e-9904-6dda  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n70b5-e874-5844  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n00d8-610c-3d58  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n  ---- More ----',\n",
       " '\\x1b[16D                \\x1b[16D020f-ed77-7960  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n8469-9386-4585  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8fcc-90b6  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n74d4-356c-8a6b  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n5850-ed6d-2f7b  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n807c-6202-b8a1  1        Learned         GigabitEthernet1/0/24     AGING\\r\\ne062-9032-a966  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n4cbd-8fcc-90b8  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n408d-5ce7-408c  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n5850-ed6d-2f60  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cf5-dc97-36b4  1        Learned         GigabitEthernet1/0/24     AGING\\r\\na85e-45a2-e00a  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nfcaa-1422-a331  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4419-b649-8498  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf000-003f-669d  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cf5-dc97-3695  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf000-003f-669c  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cf5-dc97-366e  1        Learned         GigabitEthernet1/0/24     AGING\\r\\ne0d5-5e6d-bd23  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf000-006c-6811  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf000-003a-bec0  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cf5-dc97-3677  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf000-003a-bec5  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n  ---- More ----',\n",
       " '\\x1b[16D                \\x1b[16Dd258-42b8-7696  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n408d-5cfd-e739  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf4b5-203b-2404  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf000-003a-bee5  1        Learned         GigabitEthernet1/0/17     AGING\\r\\nb42e-991d-4210  1        Learned         GigabitEthernet1/0/20     AGING\\r\\n4cbd-8fd5-db1e  1        Learned         GigabitEthernet1/0/7      AGING\\r\\na202-22b2-1209  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cf5-dc9a-c39e  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8fcc-9024  1        Learned         GigabitEthernet1/0/24     AGING\\r\\ne062-90dd-0803  1        Learned         GigabitEthernet1/0/23     AGING\\r\\nb42e-9968-4090  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf4b5-2024-ebaf  1        Learned         GigabitEthernet1/0/23     AGING\\r\\nacb9-2f24-2384  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf000-003a-beb3  1        Learned         GigabitEthernet1/0/1      AGING\\r\\ne0d5-5ef7-0e13  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n6045-cb7f-c902  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf000-003a-beab  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf000-003a-beaf  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n849a-4059-b273  1        Learned         GigabitEthernet1/0/24     AGING\\r\\naccb-51de-42e4  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4ced-fb41-fba5  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf4b5-2024-f44c  1        Learned         GigabitEthernet1/0/23     AGING\\r\\ne062-90f6-66b9  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n  ---- More ----',\n",
       " '\\x1b[16D                \\x1b[16D00e0-4c3c-a0db  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4419-b649-87f4  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n74d4-356d-891e  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n408d-5c8f-2aca  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nb42e-99e6-329b  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf000-003b-494a  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n4cbd-8f79-1968  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n4419-b649-87da  1        Learned         GigabitEthernet1/0/24     AGING\\r\\na85e-45a0-0b0e  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cf5-dc97-35a9  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n70b5-e874-5732  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nb42e-997a-2570  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4419-b649-83af  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf000-003b-4935  1        Learned         GigabitEthernet1/0/3      AGING\\r\\nf000-003b-4931  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n7427-eae8-fef9  1        Learned         GigabitEthernet1/0/24     AGING\\r\\ne062-908d-9995  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n00e0-0b48-a717  1        Learned         GigabitEthernet1/0/23     AGING\\r\\nf000-006c-67ee  1        Learned         GigabitEthernet1/0/13     AGING\\r\\nb42e-997a-2550  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n307b-acc4-4070  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n307b-acc4-407c  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n307b-acc4-4085  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n  ---- More ----',\n",
       " '\\x1b[16D                \\x1b[16De062-902f-e906  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n4cbd-8f79-19ca  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n307b-acc4-4094  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nb42e-9944-2e6e  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n686d-bcf6-0e91  1        Learned         GigabitEthernet1/0/22     AGING\\r\\nfcaa-140d-3103  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n00e0-4cff-2c14  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n00e0-4c57-9160  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n0017-6112-a93b  1        Learned         GigabitEthernet1/0/18     AGING\\r\\ne062-908a-bdc9  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n4419-b649-8705  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4419-b649-8706  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8f79-19ac  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n4419-b649-8709  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4419-b649-870a  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf0c3-7163-6b2a  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4419-b649-870f  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nb42e-9968-3f8c  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4419-b649-8714  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4419-b649-8717  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n1012-fb7a-2656  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4419-b649-8716  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4419-b649-8718  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n  ---- More ----',\n",
       " '\\x1b[16D                \\x1b[16D2428-fdc1-7333  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4419-b649-871c  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n2428-fdc1-76cc  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n5404-a6a1-7fb1  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n2428-fdc1-76c7  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n00e0-4f03-2e24  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf000-003b-487f  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n4cbd-8fba-d022  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n4419-b649-86fd  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4419-b649-86fc  1        Learned         GigabitEthernet1/0/24     AGING\\r\\ne062-90b0-4b6a  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n309c-237d-6c73  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n2428-fdc1-76d0  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n0840-f360-a0d8  1        Learned         GigabitEthernet1/0/23     AGING\\r\\nd45d-6439-a7a3  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n2428-fdc1-76e4  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8fba-d012  1        Learned         GigabitEthernet1/0/23     AGING\\r\\nc273-bfd6-522f  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n70b5-e874-4644  1        Learned         GigabitEthernet1/0/23     AGING\\r\\nf000-003b-4854  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf000-003b-485d  1        Learned         GigabitEthernet1/0/16     AGING\\r\\n4cbd-8f90-6d54  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf000-006b-da3e  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n  ---- More ----',\n",
       " '\\x1b[16D                \\x1b[16Df000-003f-64a8  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n7405-a563-fba3  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n00e0-4c37-ace4  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n8630-12f1-da35  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n2428-fdc1-7699  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf4b5-203b-1eec  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf000-003f-58bf  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n5475-959c-548b  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4419-b641-7795  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n2428-fdc1-76a4  1        Learned         GigabitEthernet1/0/23     AGING\\r\\nc06d-ed2c-d964  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf000-003f-589e  1        Learned         GigabitEthernet1/0/24     AGING\\r\\ne062-90bb-da7a  1        Learned         GigabitEthernet1/0/24     AGING\\r\\ne062-90eb-0492  1        Learned         GigabitEthernet1/0/23     AGING\\r\\nb42e-9971-29cd  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n70b5-e874-56e5  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n0492-265b-262c  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cf5-dc97-3471  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4ced-fb6c-ef9f  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n00e0-4c85-826d  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cf5-dc97-344e  1        Learned         GigabitEthernet1/0/24     AGING\\r\\ne247-1f2c-0f6d  1        Learned         GigabitEthernet1/0/23     AGING\\r\\nf000-003b-48a1  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n  ---- More ----',\n",
       " '\\x1b[16D                \\x1b[16Df000-006c-6648  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cf5-dc97-3421  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8f90-71a7  1        Learned         GigabitEthernet1/0/23     AGING\\r\\nf4b5-2024-f19b  1        Learned         GigabitEthernet1/0/23     AGING\\r\\ne062-9087-a15a  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n4cf5-dc97-343e  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nacb9-2f46-05f5  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n5254-0033-e4b7  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4419-b649-8609  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf4b5-203b-1e44  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n4cbd-8f90-7198  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8f90-719c  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n4419-b649-8619  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n309c-23b9-101a  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf000-003b-489a  1        Learned         GigabitEthernet1/0/11     AGING\\r\\na85e-45a0-0ace  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n5254-00c1-4efa  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n\\r\\n --- 223 mac address(es) found ---\\r\\n\\r\\n<lou7>']"
      ]
     },
     "execution_count": 80,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "\n",
    "def mac2tab(tn):\n",
    "    \"\"\" h3c返回交换 arp表\"\"\"\n",
    "    tabLs = []\n",
    "    tn.write(b\" display mac-address\\n\")\n",
    "    while 1 :\n",
    "        outLs = tn.expect([b\"\\r\\r\\n---- More ----\"],timeout=5) #//[b\"\\r\\r\\n---- More ----\"]\n",
    "        if outLs[0]  >-1 :\n",
    "            #还有下一个页\n",
    "            tn.write(b\" \")\n",
    "            tabLs.append(outLs[2].decode('ascii'))\n",
    "            #print(outLs)\n",
    "        if outLs[0] < 0:\n",
    "            # 完成读取\n",
    "            #print(outLs)\n",
    "            tabLs.append(outLs[2].decode('ascii'))\n",
    "            break\n",
    "    return tabLs\n",
    "\n",
    "\n",
    "tabLs = arp2tab(tn)\n",
    "                       \n",
    "tabLs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 74,
   "id": "d7ae941a",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'\\x1b[16D                \\x1b[16Df000-006c-8155  1        Learned         GigabitEthernet1/0/15     AGING\\r\\n807c-62bb-4e1e  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n5254-00d4-636c  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nca8d-10bb-62ab  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n2428-fddc-be9d  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nb42e-99e6-3c49  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf000-006c-8167  1        Learned         GigabitEthernet1/0/5      AGING\\r\\n309c-2365-209e  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n80fb-06c9-6db9  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n0c9d-92cc-8c94  1        Learned         GigabitEthernet1/0/24     AGING\\r\\ne0d5-5e51-ea27  1        Learned         GigabitEthernet1/0/23     AGING\\r\\nb42e-99ea-043c  1        Learned         GigabitEthernet1/0/24     AGING\\r\\ne0d5-5e56-7edb  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8fd5-dbd4  1        Learned         GigabitEthernet1/0/14     AGING\\r\\n8ce7-486e-bf80  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n0c9d-921b-267b  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nd263-05e0-8c23  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n0020-6bb3-b6d7  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf4b5-2024-ef6b  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nb42e-9979-de61  1        Learned         GigabitEthernet1/0/24     AGING\\r\\ne0d5-5efa-1b79  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n44a6-42b6-c0a3  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf4b5-2024-f365  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n  ---- More ----'"
      ]
     },
     "execution_count": 74,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "tabLs[2]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 81,
   "id": "a0e1c91d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "10"
      ]
     },
     "execution_count": 81,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(tabLs)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 52,
   "id": "5964c630",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'display mac-addr \\r\\nMAC ADDR        VLAN ID  STATE           PORT INDEX                AGING TIME(s)\\r\\n4cbd-8f79-1b53  1        Learned         GigabitEthernet1/0/23     AGING\\r\\ne0d5-5efc-0288  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n00e0-4c52-032d  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n40b0-765f-6e47  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n04f9-f816-6b61  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n4cbd-8f79-1b76  1        Learned         GigabitEthernet1/0/23     AGING\\r\\nfcaa-1470-f02e  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8f79-1b7a  1        Learned         GigabitEthernet1/0/23     AGING\\r\\nb42e-999d-1f99  1        Learned         GigabitEthernet1/0/24     AGING\\r\\ne062-90c9-1712  1        Learned         GigabitEthernet1/0/23     AGING\\r\\nf079-596c-908a  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n7486-e218-0a99  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n0017-6112-279e  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n4419-b649-85b6  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8fd5-da85  1        Learned         GigabitEthernet1/0/24     AGING\\r\\ne0d5-5ec3-191d  1        Learned         GigabitEthernet1/0/23     AGING\\r\\ne062-9082-2258  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n4cbd-8f2c-9597  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8f2c-9592  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8fd5-dab2  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n4cbd-8f79-1b2a  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n4cbd-8fd5-dab0  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n  ---- More ----\\x1b[16D                \\x1b[16D4cb0-0810-6c1e  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8f2c-9572  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n8811-96af-173e  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8f2c-957c  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n0017-6112-ab50  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n4419-b649-8575  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n5cde-3414-a887  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8fd3-2aa9  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n5cc9-99ea-55e0  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n4cbd-8fd5-da70  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8fd5-da71  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8fd5-da6e  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n18c0-4d1b-c69e  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n00e0-4f03-c582  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n408d-5c1d-9e3e  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8f79-1b84  1        Learned         GigabitEthernet1/0/23     AGING\\r\\nc051-7ea4-099f  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n00e0-4d95-1326  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8f79-1b80  1        Learned         GigabitEthernet1/0/23     AGING\\r\\nf000-006c-8155  1        Learned         GigabitEthernet1/0/15     AGING\\r\\n807c-62bb-4e1e  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n5254-00d4-636c  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nca8d-10bb-62ab  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n  ---- More ----\\x1b[16D                \\x1b[16D3c6a-4838-ecd5  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n2428-fddc-be9d  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nb42e-99e6-3c49  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf000-006c-8167  1        Learned         GigabitEthernet1/0/5      AGING\\r\\n309c-2365-209e  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n80fb-06c9-6db9  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n0c9d-92cc-8c94  1        Learned         GigabitEthernet1/0/24     AGING\\r\\ne0d5-5e51-ea27  1        Learned         GigabitEthernet1/0/23     AGING\\r\\nb42e-99ea-043c  1        Learned         GigabitEthernet1/0/24     AGING\\r\\ne0d5-5e56-7edb  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8fd5-dbd4  1        Learned         GigabitEthernet1/0/14     AGING\\r\\n8ce7-486e-bf80  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n0c9d-921b-267b  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n0020-6bb3-b6d7  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf4b5-2024-ef6b  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nb42e-9979-de61  1        Learned         GigabitEthernet1/0/24     AGING\\r\\ne0d5-5efa-1b79  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n44a6-42b6-c0a3  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf4b5-2024-f365  1        Learned         GigabitEthernet1/0/23     AGING\\r\\nb42e-9904-6dda  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n70b5-e874-5844  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n00d8-610c-3d58  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n8469-9386-4585  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n  ---- More ----\\x1b[16D                \\x1b[16D4cbd-8fcc-90b6  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n74d4-356c-8a6b  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n5850-ed6d-2f7b  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n807c-6202-b8a1  1        Learned         GigabitEthernet1/0/24     AGING\\r\\ne062-9032-a966  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n4cbd-8fcc-90b8  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n408d-5ce7-408c  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n5850-ed6d-2f60  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cf5-dc97-36b4  1        Learned         GigabitEthernet1/0/24     AGING\\r\\na85e-45a2-e00a  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nfcaa-1422-a331  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4419-b649-8498  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cf5-dc97-3695  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf000-003f-669c  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cf5-dc97-366e  1        Learned         GigabitEthernet1/0/24     AGING\\r\\ne0d5-5e6d-bd23  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cf5-dc97-3677  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf000-003a-bec5  1        Learned         GigabitEthernet1/0/23     AGING\\r\\nd258-42b8-7696  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n408d-5cfd-e739  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf4b5-203b-2404  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n8220-c9c9-82b6  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nb42e-991d-4210  1        Learned         GigabitEthernet1/0/20     AGING\\r\\n  ---- More ----\\x1b[16D                \\x1b[16D4cbd-8fd5-db1e  1        Learned         GigabitEthernet1/0/7      AGING\\r\\na202-22b2-1209  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cf5-dc9a-c39e  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8fcc-9024  1        Learned         GigabitEthernet1/0/24     AGING\\r\\ne062-90dd-0803  1        Learned         GigabitEthernet1/0/23     AGING\\r\\nb42e-9968-4090  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf4b5-2024-ebaf  1        Learned         GigabitEthernet1/0/23     AGING\\r\\nacb9-2f24-2384  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf000-003a-beb3  1        Learned         GigabitEthernet1/0/1      AGING\\r\\ne0d5-5ef7-0e13  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n6045-cb7f-c902  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf000-003a-beaf  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n849a-4059-b273  1        Learned         GigabitEthernet1/0/24     AGING\\r\\naccb-51de-42e4  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4ced-fb41-fba5  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf4b5-2024-f44c  1        Learned         GigabitEthernet1/0/23     AGING\\r\\ne062-90f6-66b9  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n00e0-4c3c-a0db  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4419-b649-87f4  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n74d4-356d-891e  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n408d-5c8f-2aca  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nb42e-99e6-329b  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf000-003b-494a  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n  ---- More ----\\x1b[16D                \\x1b[16D4cbd-8f79-1968  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n4419-b649-87da  1        Learned         GigabitEthernet1/0/24     AGING\\r\\na85e-45a0-0b0e  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cf5-dc97-35a9  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n70b5-e874-5732  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nb42e-997a-2570  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4419-b649-83af  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf000-003b-4935  1        Learned         GigabitEthernet1/0/3      AGING\\r\\n7427-eae8-fef9  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n00e0-0b48-a717  1        Learned         GigabitEthernet1/0/23     AGING\\r\\nf000-006c-67ee  1        Learned         GigabitEthernet1/0/13     AGING\\r\\nb42e-997a-2550  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n307b-acc4-4070  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n307b-acc4-407c  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n307b-acc4-4085  1        Learned         GigabitEthernet1/0/24     AGING\\r\\ne062-902f-e906  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n4cbd-8f79-19ca  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n307b-acc4-4094  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n686d-bcf6-0e91  1        Learned         GigabitEthernet1/0/22     AGING\\r\\nfcaa-140d-3103  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n00e0-4cff-2c14  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n00e0-4c57-9160  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n728a-a3ba-da4f  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n  ---- More ----\\x1b[16D                \\x1b[16D0017-6112-a93b  1        Learned         GigabitEthernet1/0/18     AGING\\r\\ne062-908a-bdc9  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n4419-b649-8705  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4419-b649-8706  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8f79-19ac  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n4419-b649-8709  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4419-b649-870a  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf0c3-7163-6b2a  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4419-b649-870f  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nb42e-9968-3f8c  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4419-b649-8714  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4419-b649-8717  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n1012-fb7a-2656  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4419-b649-8716  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4419-b649-8718  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n2428-fdc1-7333  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4419-b649-871c  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n2428-fdc1-76cc  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n5404-a6a1-7fb1  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n2428-fdc1-76c7  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n00e0-4f03-2e24  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf000-003b-487f  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n4cbd-8fba-d022  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n  ---- More ----\\x1b[16D                \\x1b[16D4419-b649-86fd  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4419-b649-86fc  1        Learned         GigabitEthernet1/0/24     AGING\\r\\ne062-90b0-4b6a  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n309c-237d-6c73  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n2428-fdc1-76d0  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n0840-f360-a0d8  1        Learned         GigabitEthernet1/0/23     AGING\\r\\nd45d-6439-a7a3  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf484-8df7-5db7  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n2428-fdc1-76e4  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8fba-d012  1        Learned         GigabitEthernet1/0/23     AGING\\r\\nc273-bfd6-522f  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n70b5-e874-4644  1        Learned         GigabitEthernet1/0/23     AGING\\r\\nf000-003b-485d  1        Learned         GigabitEthernet1/0/16     AGING\\r\\n4cbd-8f90-6d54  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n7405-a563-fba3  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n00e0-4c37-ace4  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n8630-12f1-da35  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n2428-fdc1-7699  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf4b5-203b-1eec  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf000-003f-58bf  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n5475-959c-548b  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4419-b641-7795  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n2428-fdc1-76a4  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n  ---- More ----\\x1b[16D                \\x1b[16Dc06d-ed2c-d964  1        Learned         GigabitEthernet1/0/24     AGING\\r\\ne062-90eb-0492  1        Learned         GigabitEthernet1/0/23     AGING\\r\\nb42e-9971-29cd  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n70b5-e874-56e5  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n0492-265b-262c  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cf5-dc97-3471  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4ced-fb6c-ef9f  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n081f-7130-405c  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n00e0-4c85-826d  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cf5-dc97-344e  1        Learned         GigabitEthernet1/0/24     AGING\\r\\ne247-1f2c-0f6d  1        Learned         GigabitEthernet1/0/23     AGING\\r\\nf000-003b-48a1  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n4cf5-dc97-3421  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8f90-71a7  1        Learned         GigabitEthernet1/0/23     AGING\\r\\nf4b5-2024-f19b  1        Learned         GigabitEthernet1/0/23     AGING\\r\\ne062-9087-a15a  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n4cf5-dc97-343e  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nacb9-2f46-05f5  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n5254-0033-e4b7  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4419-b649-8609  1        Learned         GigabitEthernet1/0/24     AGING\\r\\nf4b5-203b-1e44  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n4cbd-8f90-7198  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n4cbd-8f90-719c  1        Learned         GigabitEthernet1/0/23     AGING\\r\\n  ---- More ----\\x1b[16D                \\x1b[16D4419-b649-8619  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n309c-23b9-101a  1        Learned         GigabitEthernet1/0/24     AGING\\r\\na85e-45a0-0ace  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n5254-00c1-4efa  1        Learned         GigabitEthernet1/0/24     AGING\\r\\n\\r\\n --- 210 mac address(es) found ---\\r\\n\\r\\n<lou7>'"
      ]
     },
     "execution_count": 52,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "tabStr = ''.join(tabLs)\n",
    "tabStr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 53,
   "id": "b307199c",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "display mac-addr \r\n",
      "MAC ADDR        VLAN ID  STATE           PORT INDEX                AGING TIME(s)\r\n",
      "4cbd-8f79-1b53  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "e0d5-5efc-0288  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "00e0-4c52-032d  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "40b0-765f-6e47  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "04f9-f816-6b61  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "4cbd-8f79-1b76  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "fcaa-1470-f02e  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8f79-1b7a  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "b42e-999d-1f99  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "e062-90c9-1712  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "f079-596c-908a  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "7486-e218-0a99  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "0017-6112-279e  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "4419-b649-85b6  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8fd5-da85  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "e0d5-5ec3-191d  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "e062-9082-2258  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "4cbd-8f2c-9597  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8f2c-9592  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8fd5-dab2  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "4cbd-8f79-1b2a  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "4cbd-8fd5-dab0  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "  ---- More ----\u001b[16D                \u001b[16D4cb0-0810-6c1e  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8f2c-9572  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "8811-96af-173e  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8f2c-957c  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "0017-6112-ab50  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "4419-b649-8575  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "5cde-3414-a887  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8fd3-2aa9  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "5cc9-99ea-55e0  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "4cbd-8fd5-da70  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8fd5-da71  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8fd5-da6e  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "18c0-4d1b-c69e  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "00e0-4f03-c582  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "408d-5c1d-9e3e  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8f79-1b84  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "c051-7ea4-099f  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "00e0-4d95-1326  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8f79-1b80  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "f000-006c-8155  1        Learned         GigabitEthernet1/0/15     AGING\r\n",
      "807c-62bb-4e1e  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "5254-00d4-636c  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "ca8d-10bb-62ab  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "  ---- More ----\u001b[16D                \u001b[16D3c6a-4838-ecd5  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "2428-fddc-be9d  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "b42e-99e6-3c49  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f000-006c-8167  1        Learned         GigabitEthernet1/0/5      AGING\r\n",
      "309c-2365-209e  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "80fb-06c9-6db9  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "0c9d-92cc-8c94  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "e0d5-5e51-ea27  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "b42e-99ea-043c  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "e0d5-5e56-7edb  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8fd5-dbd4  1        Learned         GigabitEthernet1/0/14     AGING\r\n",
      "8ce7-486e-bf80  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "0c9d-921b-267b  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "0020-6bb3-b6d7  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f4b5-2024-ef6b  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "b42e-9979-de61  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "e0d5-5efa-1b79  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "44a6-42b6-c0a3  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f4b5-2024-f365  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "b42e-9904-6dda  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "70b5-e874-5844  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "00d8-610c-3d58  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "8469-9386-4585  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "  ---- More ----\u001b[16D                \u001b[16D4cbd-8fcc-90b6  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "74d4-356c-8a6b  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "5850-ed6d-2f7b  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "807c-6202-b8a1  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "e062-9032-a966  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "4cbd-8fcc-90b8  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "408d-5ce7-408c  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "5850-ed6d-2f60  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cf5-dc97-36b4  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "a85e-45a2-e00a  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "fcaa-1422-a331  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4419-b649-8498  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cf5-dc97-3695  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f000-003f-669c  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cf5-dc97-366e  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "e0d5-5e6d-bd23  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cf5-dc97-3677  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f000-003a-bec5  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "d258-42b8-7696  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "408d-5cfd-e739  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f4b5-203b-2404  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "8220-c9c9-82b6  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "b42e-991d-4210  1        Learned         GigabitEthernet1/0/20     AGING\r\n",
      "  ---- More ----\u001b[16D                \u001b[16D4cbd-8fd5-db1e  1        Learned         GigabitEthernet1/0/7      AGING\r\n",
      "a202-22b2-1209  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cf5-dc9a-c39e  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8fcc-9024  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "e062-90dd-0803  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "b42e-9968-4090  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f4b5-2024-ebaf  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "acb9-2f24-2384  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f000-003a-beb3  1        Learned         GigabitEthernet1/0/1      AGING\r\n",
      "e0d5-5ef7-0e13  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "6045-cb7f-c902  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f000-003a-beaf  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "849a-4059-b273  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "accb-51de-42e4  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4ced-fb41-fba5  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f4b5-2024-f44c  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "e062-90f6-66b9  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "00e0-4c3c-a0db  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4419-b649-87f4  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "74d4-356d-891e  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "408d-5c8f-2aca  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "b42e-99e6-329b  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f000-003b-494a  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "  ---- More ----\u001b[16D                \u001b[16D4cbd-8f79-1968  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "4419-b649-87da  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "a85e-45a0-0b0e  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cf5-dc97-35a9  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "70b5-e874-5732  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "b42e-997a-2570  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4419-b649-83af  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f000-003b-4935  1        Learned         GigabitEthernet1/0/3      AGING\r\n",
      "7427-eae8-fef9  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "00e0-0b48-a717  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "f000-006c-67ee  1        Learned         GigabitEthernet1/0/13     AGING\r\n",
      "b42e-997a-2550  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "307b-acc4-4070  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "307b-acc4-407c  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "307b-acc4-4085  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "e062-902f-e906  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "4cbd-8f79-19ca  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "307b-acc4-4094  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "686d-bcf6-0e91  1        Learned         GigabitEthernet1/0/22     AGING\r\n",
      "fcaa-140d-3103  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "00e0-4cff-2c14  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "00e0-4c57-9160  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "728a-a3ba-da4f  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "  ---- More ----\u001b[16D                \u001b[16D0017-6112-a93b  1        Learned         GigabitEthernet1/0/18     AGING\r\n",
      "e062-908a-bdc9  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "4419-b649-8705  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4419-b649-8706  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8f79-19ac  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "4419-b649-8709  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4419-b649-870a  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f0c3-7163-6b2a  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4419-b649-870f  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "b42e-9968-3f8c  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4419-b649-8714  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4419-b649-8717  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "1012-fb7a-2656  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4419-b649-8716  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4419-b649-8718  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "2428-fdc1-7333  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4419-b649-871c  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "2428-fdc1-76cc  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "5404-a6a1-7fb1  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "2428-fdc1-76c7  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "00e0-4f03-2e24  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f000-003b-487f  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "4cbd-8fba-d022  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "  ---- More ----\u001b[16D                \u001b[16D4419-b649-86fd  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4419-b649-86fc  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "e062-90b0-4b6a  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "309c-237d-6c73  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "2428-fdc1-76d0  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "0840-f360-a0d8  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "d45d-6439-a7a3  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f484-8df7-5db7  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "2428-fdc1-76e4  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8fba-d012  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "c273-bfd6-522f  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "70b5-e874-4644  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "f000-003b-485d  1        Learned         GigabitEthernet1/0/16     AGING\r\n",
      "4cbd-8f90-6d54  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "7405-a563-fba3  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "00e0-4c37-ace4  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "8630-12f1-da35  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "2428-fdc1-7699  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f4b5-203b-1eec  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f000-003f-58bf  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "5475-959c-548b  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4419-b641-7795  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "2428-fdc1-76a4  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "  ---- More ----\u001b[16D                \u001b[16Dc06d-ed2c-d964  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "e062-90eb-0492  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "b42e-9971-29cd  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "70b5-e874-56e5  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "0492-265b-262c  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cf5-dc97-3471  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4ced-fb6c-ef9f  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "081f-7130-405c  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "00e0-4c85-826d  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cf5-dc97-344e  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "e247-1f2c-0f6d  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "f000-003b-48a1  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "4cf5-dc97-3421  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8f90-71a7  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "f4b5-2024-f19b  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "e062-9087-a15a  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "4cf5-dc97-343e  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "acb9-2f46-05f5  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "5254-0033-e4b7  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4419-b649-8609  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f4b5-203b-1e44  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "4cbd-8f90-7198  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8f90-719c  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "  ---- More ----\u001b[16D                \u001b[16D4419-b649-8619  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "309c-23b9-101a  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "a85e-45a0-0ace  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "5254-00c1-4efa  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "\r\n",
      " --- 210 mac address(es) found ---\r\n",
      "\r\n",
      "<lou7>\n"
     ]
    }
   ],
   "source": [
    "print(tabStr)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 82,
   "id": "12936e8b",
   "metadata": {},
   "outputs": [],
   "source": [
    "def list2str(tabLs): \n",
    "    \"\"\" h3c 多行合并成字符串\"\"\"\n",
    "    tabStr = ''.join(tabLs)\n",
    "    tabStr =  re.sub(\"  ---- More ----\\\\x1b\\[16D\\s+\\\\x1b\\[16D\", \"\", tabStr)\n",
    "    tabStr =  re.sub(\"\\r\\r\\n\",\"\\r\\n\", tabStr)   \n",
    "    return tabStr\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "03c76606",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 83,
   "id": "ca533524",
   "metadata": {},
   "outputs": [],
   "source": [
    "tabStr = list2str(tabLs)   "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 84,
   "id": "2ddedef8",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "display mac-addr \r\n",
      "MAC ADDR        VLAN ID  STATE           PORT INDEX                AGING TIME(s)\r\n",
      "a85e-455a-5a7c  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8f79-1b53  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "e0d5-5efc-0288  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "00e0-4c52-032d  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "40b0-765f-6e47  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "04f9-f816-6b61  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "7486-e218-1afe  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8f79-1b76  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "fcaa-1470-f02e  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8f79-1b7a  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "b42e-999d-1f99  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "e062-90c9-1712  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "f079-596c-908a  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "7486-e218-0a99  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "0017-6112-279e  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "4419-b649-85b6  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8fd5-da85  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "e0d5-5ec3-191d  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "e062-9082-2258  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "4cbd-8f2c-9597  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8f2c-9592  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8fd5-dab2  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "4cbd-8f79-1b2a  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "4cbd-8fd5-dab0  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "4cb0-0810-6c1e  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8f2c-9572  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "8811-96af-173e  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8f2c-957c  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "0017-6112-ab50  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "4419-b649-8575  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8fd3-2aa9  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "5cc9-99ea-55e0  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "4cbd-8fd5-da70  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8fd5-da71  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8fd5-da6e  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "e062-90bb-c9b5  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "18c0-4d1b-c69e  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "00e0-4f03-c582  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "408d-5c1d-9e3e  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8f79-1b84  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "c051-7ea4-099f  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "00e0-4d95-1326  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8f79-1b80  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "f000-006c-8155  1        Learned         GigabitEthernet1/0/15     AGING\r\n",
      "807c-62bb-4e1e  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "5254-00d4-636c  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "ca8d-10bb-62ab  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "2428-fddc-be9d  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "b42e-99e6-3c49  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f000-006c-8167  1        Learned         GigabitEthernet1/0/5      AGING\r\n",
      "309c-2365-209e  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "80fb-06c9-6db9  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "0c9d-92cc-8c94  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "e0d5-5e51-ea27  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "b42e-99ea-043c  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "e0d5-5e56-7edb  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8fd5-dbd4  1        Learned         GigabitEthernet1/0/14     AGING\r\n",
      "8ce7-486e-bf80  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "0c9d-921b-267b  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "d263-05e0-8c23  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f4b5-2024-ef6b  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "b42e-9979-de61  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "e0d5-5efa-1b79  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "44a6-42b6-c0a3  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f4b5-2024-f365  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "b42e-9904-6dda  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "70b5-e874-5844  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "00d8-610c-3d58  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "020f-ed77-7960  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "8469-9386-4585  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8fcc-90b6  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "74d4-356c-8a6b  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "5850-ed6d-2f7b  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "807c-6202-b8a1  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "e062-9032-a966  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "4cbd-8fcc-90b8  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "408d-5ce7-408c  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "5850-ed6d-2f60  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cf5-dc97-36b4  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "a85e-45a2-e00a  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "fcaa-1422-a331  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4419-b649-8498  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f000-003f-669d  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cf5-dc97-3695  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f000-003f-669c  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cf5-dc97-366e  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "e0d5-5e6d-bd23  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f000-006c-6811  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f000-003a-bec0  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cf5-dc97-3677  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f000-003a-bec5  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "d258-42b8-7696  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "408d-5cfd-e739  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f4b5-203b-2404  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f000-003a-bee5  1        Learned         GigabitEthernet1/0/17     AGING\r\n",
      "b42e-991d-4210  1        Learned         GigabitEthernet1/0/20     AGING\r\n",
      "4cbd-8fd5-db1e  1        Learned         GigabitEthernet1/0/7      AGING\r\n",
      "a202-22b2-1209  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cf5-dc9a-c39e  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8fcc-9024  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "e062-90dd-0803  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "b42e-9968-4090  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f4b5-2024-ebaf  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "acb9-2f24-2384  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f000-003a-beb3  1        Learned         GigabitEthernet1/0/1      AGING\r\n",
      "e0d5-5ef7-0e13  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "6045-cb7f-c902  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f000-003a-beab  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f000-003a-beaf  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "849a-4059-b273  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "accb-51de-42e4  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4ced-fb41-fba5  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f4b5-2024-f44c  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "e062-90f6-66b9  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "00e0-4c3c-a0db  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4419-b649-87f4  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "74d4-356d-891e  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "408d-5c8f-2aca  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "b42e-99e6-329b  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f000-003b-494a  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "4cbd-8f79-1968  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "4419-b649-87da  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "a85e-45a0-0b0e  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cf5-dc97-35a9  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "70b5-e874-5732  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "b42e-997a-2570  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4419-b649-83af  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f000-003b-4935  1        Learned         GigabitEthernet1/0/3      AGING\r\n",
      "f000-003b-4931  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "7427-eae8-fef9  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "e062-908d-9995  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "00e0-0b48-a717  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "f000-006c-67ee  1        Learned         GigabitEthernet1/0/13     AGING\r\n",
      "b42e-997a-2550  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "307b-acc4-4070  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "307b-acc4-407c  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "307b-acc4-4085  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "e062-902f-e906  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "4cbd-8f79-19ca  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "307b-acc4-4094  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "b42e-9944-2e6e  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "686d-bcf6-0e91  1        Learned         GigabitEthernet1/0/22     AGING\r\n",
      "fcaa-140d-3103  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "00e0-4cff-2c14  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "00e0-4c57-9160  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "0017-6112-a93b  1        Learned         GigabitEthernet1/0/18     AGING\r\n",
      "e062-908a-bdc9  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "4419-b649-8705  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4419-b649-8706  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8f79-19ac  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "4419-b649-8709  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4419-b649-870a  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f0c3-7163-6b2a  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4419-b649-870f  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "b42e-9968-3f8c  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4419-b649-8714  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4419-b649-8717  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "1012-fb7a-2656  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4419-b649-8716  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4419-b649-8718  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "2428-fdc1-7333  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4419-b649-871c  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "2428-fdc1-76cc  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "5404-a6a1-7fb1  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "2428-fdc1-76c7  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "00e0-4f03-2e24  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f000-003b-487f  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "4cbd-8fba-d022  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "4419-b649-86fd  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4419-b649-86fc  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "e062-90b0-4b6a  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "309c-237d-6c73  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "2428-fdc1-76d0  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "0840-f360-a0d8  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "d45d-6439-a7a3  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "2428-fdc1-76e4  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8fba-d012  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "c273-bfd6-522f  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "70b5-e874-4644  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "f000-003b-4854  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f000-003b-485d  1        Learned         GigabitEthernet1/0/16     AGING\r\n",
      "4cbd-8f90-6d54  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f000-006b-da3e  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f000-003f-64a8  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "7405-a563-fba3  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "00e0-4c37-ace4  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "8630-12f1-da35  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "2428-fdc1-7699  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f4b5-203b-1eec  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f000-003f-58bf  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "5475-959c-548b  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4419-b641-7795  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "2428-fdc1-76a4  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "c06d-ed2c-d964  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f000-003f-589e  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "e062-90bb-da7a  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "e062-90eb-0492  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "b42e-9971-29cd  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "70b5-e874-56e5  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "0492-265b-262c  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cf5-dc97-3471  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4ced-fb6c-ef9f  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "00e0-4c85-826d  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cf5-dc97-344e  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "e247-1f2c-0f6d  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "f000-003b-48a1  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "f000-006c-6648  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cf5-dc97-3421  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8f90-71a7  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "f4b5-2024-f19b  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "e062-9087-a15a  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "4cf5-dc97-343e  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "acb9-2f46-05f5  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "5254-0033-e4b7  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4419-b649-8609  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f4b5-203b-1e44  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "4cbd-8f90-7198  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "4cbd-8f90-719c  1        Learned         GigabitEthernet1/0/23     AGING\r\n",
      "4419-b649-8619  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "309c-23b9-101a  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "f000-003b-489a  1        Learned         GigabitEthernet1/0/11     AGING\r\n",
      "a85e-45a0-0ace  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "5254-00c1-4efa  1        Learned         GigabitEthernet1/0/24     AGING\r\n",
      "\r\n",
      " --- 223 mac address(es) found ---\r\n",
      "\r\n",
      "<lou7>\n"
     ]
    }
   ],
   "source": [
    "print(tabStr)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 86,
   "id": "c59bdefd",
   "metadata": {},
   "outputs": [],
   "source": [
    "def arp2rows(arpTab,tpl=\"display-mac-s1580.template\"):\n",
    "    \"\"\"  解析表格字符串  返回json\"\"\"\n",
    "    f = open(tpl)\n",
    "    template = TextFSM(f)\n",
    "    outTab = template.ParseText(arpTab)\n",
    "    return outTab\n",
    "arpLs = arp2rows(tabStr)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 87,
   "id": "071f051d",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "223"
      ]
     },
     "execution_count": 87,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(arpLs) "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 88,
   "id": "e10d2374",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[['a85e-455a-5a7c', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4cbd-8f79-1b53', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['e0d5-5efc-0288', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['00e0-4c52-032d', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['40b0-765f-6e47', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['04f9-f816-6b61', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['7486-e218-1afe', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4cbd-8f79-1b76', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['fcaa-1470-f02e', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4cbd-8f79-1b7a', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['b42e-999d-1f99', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['e062-90c9-1712', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['f079-596c-908a', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['7486-e218-0a99', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['0017-6112-279e', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['4419-b649-85b6', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4cbd-8fd5-da85', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['e0d5-5ec3-191d', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['e062-9082-2258', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['4cbd-8f2c-9597', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4cbd-8f2c-9592', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4cbd-8fd5-dab2', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['4cbd-8f79-1b2a', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['4cbd-8fd5-dab0', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['4cb0-0810-6c1e', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4cbd-8f2c-9572', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['8811-96af-173e', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4cbd-8f2c-957c', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['0017-6112-ab50', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['4419-b649-8575', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4cbd-8fd3-2aa9', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['5cc9-99ea-55e0', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['4cbd-8fd5-da70', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4cbd-8fd5-da71', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4cbd-8fd5-da6e', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['e062-90bb-c9b5', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['18c0-4d1b-c69e', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['00e0-4f03-c582', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['408d-5c1d-9e3e', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4cbd-8f79-1b84', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['c051-7ea4-099f', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['00e0-4d95-1326', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4cbd-8f79-1b80', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['f000-006c-8155', '1', 'Learned', 'GigabitEthernet1/0/15'],\n",
       " ['807c-62bb-4e1e', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['5254-00d4-636c', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['ca8d-10bb-62ab', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['2428-fddc-be9d', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['b42e-99e6-3c49', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['f000-006c-8167', '1', 'Learned', 'GigabitEthernet1/0/5'],\n",
       " ['309c-2365-209e', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['80fb-06c9-6db9', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['0c9d-92cc-8c94', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['e0d5-5e51-ea27', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['b42e-99ea-043c', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['e0d5-5e56-7edb', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4cbd-8fd5-dbd4', '1', 'Learned', 'GigabitEthernet1/0/14'],\n",
       " ['8ce7-486e-bf80', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['0c9d-921b-267b', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['d263-05e0-8c23', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['f4b5-2024-ef6b', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['b42e-9979-de61', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['e0d5-5efa-1b79', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['44a6-42b6-c0a3', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['f4b5-2024-f365', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['b42e-9904-6dda', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['70b5-e874-5844', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['00d8-610c-3d58', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['020f-ed77-7960', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['8469-9386-4585', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4cbd-8fcc-90b6', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['74d4-356c-8a6b', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['5850-ed6d-2f7b', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['807c-6202-b8a1', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['e062-9032-a966', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['4cbd-8fcc-90b8', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['408d-5ce7-408c', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['5850-ed6d-2f60', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4cf5-dc97-36b4', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['a85e-45a2-e00a', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['fcaa-1422-a331', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4419-b649-8498', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['f000-003f-669d', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4cf5-dc97-3695', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['f000-003f-669c', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4cf5-dc97-366e', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['e0d5-5e6d-bd23', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['f000-006c-6811', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['f000-003a-bec0', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4cf5-dc97-3677', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['f000-003a-bec5', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['d258-42b8-7696', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['408d-5cfd-e739', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['f4b5-203b-2404', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['f000-003a-bee5', '1', 'Learned', 'GigabitEthernet1/0/17'],\n",
       " ['b42e-991d-4210', '1', 'Learned', 'GigabitEthernet1/0/20'],\n",
       " ['4cbd-8fd5-db1e', '1', 'Learned', 'GigabitEthernet1/0/7'],\n",
       " ['a202-22b2-1209', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4cf5-dc9a-c39e', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4cbd-8fcc-9024', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['e062-90dd-0803', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['b42e-9968-4090', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['f4b5-2024-ebaf', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['acb9-2f24-2384', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['f000-003a-beb3', '1', 'Learned', 'GigabitEthernet1/0/1'],\n",
       " ['e0d5-5ef7-0e13', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['6045-cb7f-c902', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['f000-003a-beab', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['f000-003a-beaf', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['849a-4059-b273', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['accb-51de-42e4', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4ced-fb41-fba5', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['f4b5-2024-f44c', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['e062-90f6-66b9', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['00e0-4c3c-a0db', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4419-b649-87f4', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['74d4-356d-891e', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['408d-5c8f-2aca', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['b42e-99e6-329b', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['f000-003b-494a', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['4cbd-8f79-1968', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['4419-b649-87da', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['a85e-45a0-0b0e', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4cf5-dc97-35a9', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['70b5-e874-5732', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['b42e-997a-2570', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4419-b649-83af', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['f000-003b-4935', '1', 'Learned', 'GigabitEthernet1/0/3'],\n",
       " ['f000-003b-4931', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['7427-eae8-fef9', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['e062-908d-9995', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['00e0-0b48-a717', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['f000-006c-67ee', '1', 'Learned', 'GigabitEthernet1/0/13'],\n",
       " ['b42e-997a-2550', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['307b-acc4-4070', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['307b-acc4-407c', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['307b-acc4-4085', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['e062-902f-e906', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['4cbd-8f79-19ca', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['307b-acc4-4094', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['b42e-9944-2e6e', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['686d-bcf6-0e91', '1', 'Learned', 'GigabitEthernet1/0/22'],\n",
       " ['fcaa-140d-3103', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['00e0-4cff-2c14', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['00e0-4c57-9160', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['0017-6112-a93b', '1', 'Learned', 'GigabitEthernet1/0/18'],\n",
       " ['e062-908a-bdc9', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['4419-b649-8705', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4419-b649-8706', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4cbd-8f79-19ac', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['4419-b649-8709', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4419-b649-870a', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['f0c3-7163-6b2a', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4419-b649-870f', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['b42e-9968-3f8c', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4419-b649-8714', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4419-b649-8717', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['1012-fb7a-2656', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4419-b649-8716', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4419-b649-8718', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['2428-fdc1-7333', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4419-b649-871c', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['2428-fdc1-76cc', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['5404-a6a1-7fb1', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['2428-fdc1-76c7', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['00e0-4f03-2e24', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['f000-003b-487f', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['4cbd-8fba-d022', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['4419-b649-86fd', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4419-b649-86fc', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['e062-90b0-4b6a', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['309c-237d-6c73', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['2428-fdc1-76d0', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['0840-f360-a0d8', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['d45d-6439-a7a3', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['2428-fdc1-76e4', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4cbd-8fba-d012', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['c273-bfd6-522f', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['70b5-e874-4644', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['f000-003b-4854', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['f000-003b-485d', '1', 'Learned', 'GigabitEthernet1/0/16'],\n",
       " ['4cbd-8f90-6d54', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['f000-006b-da3e', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['f000-003f-64a8', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['7405-a563-fba3', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['00e0-4c37-ace4', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['8630-12f1-da35', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['2428-fdc1-7699', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['f4b5-203b-1eec', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['f000-003f-58bf', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['5475-959c-548b', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4419-b641-7795', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['2428-fdc1-76a4', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['c06d-ed2c-d964', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['f000-003f-589e', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['e062-90bb-da7a', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['e062-90eb-0492', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['b42e-9971-29cd', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['70b5-e874-56e5', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['0492-265b-262c', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4cf5-dc97-3471', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4ced-fb6c-ef9f', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['00e0-4c85-826d', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4cf5-dc97-344e', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['e247-1f2c-0f6d', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['f000-003b-48a1', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['f000-006c-6648', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4cf5-dc97-3421', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4cbd-8f90-71a7', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['f4b5-2024-f19b', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['e062-9087-a15a', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['4cf5-dc97-343e', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['acb9-2f46-05f5', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['5254-0033-e4b7', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4419-b649-8609', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['f4b5-203b-1e44', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['4cbd-8f90-7198', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['4cbd-8f90-719c', '1', 'Learned', 'GigabitEthernet1/0/23'],\n",
       " ['4419-b649-8619', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['309c-23b9-101a', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['f000-003b-489a', '1', 'Learned', 'GigabitEthernet1/0/11'],\n",
       " ['a85e-45a0-0ace', '1', 'Learned', 'GigabitEthernet1/0/24'],\n",
       " ['5254-00c1-4efa', '1', 'Learned', 'GigabitEthernet1/0/24']]"
      ]
     },
     "execution_count": 88,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "arpLs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 89,
   "id": "4f76bcf5",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[{'mac': 'a85e-455a-5a7c',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4cbd-8f79-1b53',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': 'e0d5-5efc-0288',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '00e0-4c52-032d',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '40b0-765f-6e47',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '04f9-f816-6b61',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': '7486-e218-1afe',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4cbd-8f79-1b76',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': 'fcaa-1470-f02e',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4cbd-8f79-1b7a',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': 'b42e-999d-1f99',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'e062-90c9-1712',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': 'f079-596c-908a',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '7486-e218-0a99',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '0017-6112-279e',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': '4419-b649-85b6',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4cbd-8fd5-da85',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'e0d5-5ec3-191d',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': 'e062-9082-2258',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': '4cbd-8f2c-9597',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4cbd-8f2c-9592',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4cbd-8fd5-dab2',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': '4cbd-8f79-1b2a',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': '4cbd-8fd5-dab0',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': '4cb0-0810-6c1e',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4cbd-8f2c-9572',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '8811-96af-173e',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4cbd-8f2c-957c',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '0017-6112-ab50',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': '4419-b649-8575',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4cbd-8fd3-2aa9',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': '5cc9-99ea-55e0',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': '4cbd-8fd5-da70',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4cbd-8fd5-da71',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4cbd-8fd5-da6e',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': 'e062-90bb-c9b5',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '18c0-4d1b-c69e',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '00e0-4f03-c582',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': '408d-5c1d-9e3e',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4cbd-8f79-1b84',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': 'c051-7ea4-099f',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '00e0-4d95-1326',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4cbd-8f79-1b80',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': 'f000-006c-8155',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/15'},\n",
       " {'mac': '807c-62bb-4e1e',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '5254-00d4-636c',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'ca8d-10bb-62ab',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '2428-fddc-be9d',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'b42e-99e6-3c49',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'f000-006c-8167',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/5'},\n",
       " {'mac': '309c-2365-209e',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '80fb-06c9-6db9',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '0c9d-92cc-8c94',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'e0d5-5e51-ea27',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': 'b42e-99ea-043c',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'e0d5-5e56-7edb',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4cbd-8fd5-dbd4',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/14'},\n",
       " {'mac': '8ce7-486e-bf80',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '0c9d-921b-267b',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'd263-05e0-8c23',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'f4b5-2024-ef6b',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'b42e-9979-de61',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'e0d5-5efa-1b79',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '44a6-42b6-c0a3',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'f4b5-2024-f365',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': 'b42e-9904-6dda',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '70b5-e874-5844',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': '00d8-610c-3d58',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '020f-ed77-7960',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': '8469-9386-4585',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4cbd-8fcc-90b6',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '74d4-356c-8a6b',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '5850-ed6d-2f7b',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '807c-6202-b8a1',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'e062-9032-a966',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': '4cbd-8fcc-90b8',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '408d-5ce7-408c',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '5850-ed6d-2f60',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4cf5-dc97-36b4',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'a85e-45a2-e00a',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'fcaa-1422-a331',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4419-b649-8498',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'f000-003f-669d',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4cf5-dc97-3695',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'f000-003f-669c',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4cf5-dc97-366e',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'e0d5-5e6d-bd23',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'f000-006c-6811',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'f000-003a-bec0',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4cf5-dc97-3677',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'f000-003a-bec5',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': 'd258-42b8-7696',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '408d-5cfd-e739',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'f4b5-203b-2404',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'f000-003a-bee5',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/17'},\n",
       " {'mac': 'b42e-991d-4210',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/20'},\n",
       " {'mac': '4cbd-8fd5-db1e',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/7'},\n",
       " {'mac': 'a202-22b2-1209',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4cf5-dc9a-c39e',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4cbd-8fcc-9024',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'e062-90dd-0803',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': 'b42e-9968-4090',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'f4b5-2024-ebaf',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': 'acb9-2f24-2384',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'f000-003a-beb3',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/1'},\n",
       " {'mac': 'e0d5-5ef7-0e13',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '6045-cb7f-c902',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'f000-003a-beab',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'f000-003a-beaf',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': '849a-4059-b273',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'accb-51de-42e4',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4ced-fb41-fba5',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'f4b5-2024-f44c',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': 'e062-90f6-66b9',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': '00e0-4c3c-a0db',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4419-b649-87f4',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '74d4-356d-891e',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': '408d-5c8f-2aca',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'b42e-99e6-329b',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'f000-003b-494a',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': '4cbd-8f79-1968',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': '4419-b649-87da',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'a85e-45a0-0b0e',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4cf5-dc97-35a9',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '70b5-e874-5732',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'b42e-997a-2570',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4419-b649-83af',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'f000-003b-4935',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/3'},\n",
       " {'mac': 'f000-003b-4931',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '7427-eae8-fef9',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'e062-908d-9995',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '00e0-0b48-a717',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': 'f000-006c-67ee',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/13'},\n",
       " {'mac': 'b42e-997a-2550',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': '307b-acc4-4070',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '307b-acc4-407c',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '307b-acc4-4085',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'e062-902f-e906',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': '4cbd-8f79-19ca',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '307b-acc4-4094',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'b42e-9944-2e6e',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '686d-bcf6-0e91',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/22'},\n",
       " {'mac': 'fcaa-140d-3103',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': '00e0-4cff-2c14',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '00e0-4c57-9160',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '0017-6112-a93b',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/18'},\n",
       " {'mac': 'e062-908a-bdc9',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': '4419-b649-8705',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4419-b649-8706',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4cbd-8f79-19ac',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': '4419-b649-8709',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4419-b649-870a',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'f0c3-7163-6b2a',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4419-b649-870f',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'b42e-9968-3f8c',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4419-b649-8714',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4419-b649-8717',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '1012-fb7a-2656',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4419-b649-8716',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4419-b649-8718',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '2428-fdc1-7333',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4419-b649-871c',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '2428-fdc1-76cc',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '5404-a6a1-7fb1',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '2428-fdc1-76c7',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '00e0-4f03-2e24',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'f000-003b-487f',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': '4cbd-8fba-d022',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': '4419-b649-86fd',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4419-b649-86fc',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'e062-90b0-4b6a',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': '309c-237d-6c73',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': '2428-fdc1-76d0',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '0840-f360-a0d8',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': 'd45d-6439-a7a3',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '2428-fdc1-76e4',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4cbd-8fba-d012',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': 'c273-bfd6-522f',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '70b5-e874-4644',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': 'f000-003b-4854',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'f000-003b-485d',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/16'},\n",
       " {'mac': '4cbd-8f90-6d54',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'f000-006b-da3e',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'f000-003f-64a8',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '7405-a563-fba3',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '00e0-4c37-ace4',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': '8630-12f1-da35',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '2428-fdc1-7699',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'f4b5-203b-1eec',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'f000-003f-58bf',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '5475-959c-548b',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4419-b641-7795',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '2428-fdc1-76a4',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': 'c06d-ed2c-d964',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'f000-003f-589e',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'e062-90bb-da7a',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'e062-90eb-0492',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': 'b42e-9971-29cd',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '70b5-e874-56e5',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '0492-265b-262c',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4cf5-dc97-3471',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4ced-fb6c-ef9f',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '00e0-4c85-826d',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4cf5-dc97-344e',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'e247-1f2c-0f6d',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': 'f000-003b-48a1',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': 'f000-006c-6648',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4cf5-dc97-3421',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4cbd-8f90-71a7',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': 'f4b5-2024-f19b',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': 'e062-9087-a15a',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': '4cf5-dc97-343e',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'acb9-2f46-05f5',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '5254-0033-e4b7',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4419-b649-8609',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'f4b5-203b-1e44',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': '4cbd-8f90-7198',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '4cbd-8f90-719c',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/23'},\n",
       " {'mac': '4419-b649-8619',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '309c-23b9-101a',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': 'f000-003b-489a',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/11'},\n",
       " {'mac': 'a85e-45a0-0ace',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'},\n",
       " {'mac': '5254-00c1-4efa',\n",
       "  'vlan': '1',\n",
       "  'state': 'Learned',\n",
       "  'port': 'GigabitEthernet1/0/24'}]"
      ]
     },
     "execution_count": 89,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "def mac2json(ls):\n",
    "    \"\"\"  带表头 col \"\"\"\n",
    "    rows = []\n",
    "    for row in ls:\n",
    "        #print(row)\n",
    "        keys = ['mac','vlan','state', 'port']\n",
    "        dc = dict(zip(keys, row))\n",
    "        rows.append(dc)\n",
    "    macJson = rows\n",
    "    #print(macJson)\n",
    "    return macJson \n",
    "   \n",
    "mac2json(arpLs )"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 90,
   "id": "4b2ab999",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "223"
      ]
     },
     "execution_count": 90,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(mac2json(arpLs))"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 92,
   "id": "0c1220e1",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "22"
      ]
     },
     "execution_count": 92,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "a=[{'mac': 'a85e-455a-5a7c', 'vlan': '1', 'state': 'Learned', 'port': 'GigabitEthernet1/0/24'}, {'mac': '4cbd-8f79-1b53', 'vlan': '1', 'state': 'Learned', 'port': 'GigabitEthernet1/0/23'}, {'mac': 'e0d5-5efc-0288', 'vlan': '1', 'state': 'Learned', 'port': 'GigabitEthernet1/0/24'}, {'mac': '00e0-4c52-032d', 'vlan': '1', 'state': 'Learned', 'port': 'GigabitEthernet1/0/24'}, {'mac': '40b0-765f-6e47', 'vlan': '1', 'state': 'Learned', 'port': 'GigabitEthernet1/0/24'}, {'mac': '04f9-f816-6b61', 'vlan': '1', 'state': 'Learned', 'port': 'GigabitEthernet1/0/23'}, {'mac': '4cbd-8f79-1b76', 'vlan': '1', 'state': 'Learned', 'port': 'GigabitEthernet1/0/23'}, {'mac': 'fcaa-1470-f02e', 'vlan': '1', 'state': 'Learned', 'port': 'GigabitEthernet1/0/24'}, {'mac': '4cbd-8f79-1b7a', 'vlan': '1', 'state': 'Learned', 'port': 'GigabitEthernet1/0/23'}, {'mac': 'b42e-999d-1f99', 'vlan': '1', 'state': 'Learned', 'port': 'GigabitEthernet1/0/24'}, {'mac': 'e062-90c9-1712', 'vlan': '1', 'state': 'Learned', 'port': 'GigabitEthernet1/0/23'}, {'mac': 'f079-596c-908a', 'vlan': '1', 'state': 'Learned', 'port': 'GigabitEthernet1/0/24'}, {'mac': '7486-e218-0a99', 'vlan': '1', 'state': 'Learned', 'port': 'GigabitEthernet1/0/24'}, {'mac': '0017-6112-279e', 'vlan': '1', 'state': 'Learned', 'port': 'GigabitEthernet1/0/23'}, {'mac': '4419-b649-85b6', 'vlan': '1', 'state': 'Learned', 'port': 'GigabitEthernet1/0/24'}, {'mac': '4cbd-8fd5-da85', 'vlan': '1', 'state': 'Learned', 'port': 'GigabitEthernet1/0/24'}, {'mac': 'e0d5-5ec3-191d', 'vlan': '1', 'state': 'Learned', 'port': 'GigabitEthernet1/0/23'}, {'mac': 'e062-9082-2258', 'vlan': '1', 'state': 'Learned', 'port': 'GigabitEthernet1/0/23'}, {'mac': '4cbd-8f2c-9597', 'vlan': '1', 'state': 'Learned', 'port': 'GigabitEthernet1/0/24'}, {'mac': '4cbd-8f2c-9592', 'vlan': '1', 'state': 'Learned', 'port': 'GigabitEthernet1/0/24'}, {'mac': '4cbd-8fd5-dab2', 'vlan': '1', 'state': 'Learned', 'port': 'GigabitEthernet1/0/23'}, {'mac': '4cbd-8f79-1b2a', 'vlan': '1', 'state': 'Learned', 'port': 'GigabitEthernet1/0/23'}]\n",
    "len(a)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 25,
   "id": "8ff142a2",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[['192.168.11.1', '80fb-06c9-6db9', 'I - ', 'Vlanif11', ''], ['192.168.11.199', 'b42e-9968-4090', 'D-0', 'Eth0/0/1', '  11'], ['192.168.11.30', '4419-b641-7795', 'D-0', 'Eth0/0/1', '  11'], ['192.168.11.189', '0800-2740-3822', 'D-0', 'Eth0/0/1', '  11'], ['192.168.12.1', '80fb-06c9-6db9', 'I - ', 'Vlanif12', ''], ['192.168.13.1', '80fb-06c9-6db9', 'I - ', 'Vlanif13', ''], ['192.168.14.1', '80fb-06c9-6db9', 'I - ', 'Vlanif14', ''], ['192.168.14.13', '8269-c0e2-cbe1', 'D-0', 'Eth0/0/11', '  14'], ['192.168.15.1', '80fb-06c9-6db9', 'I - ', 'Vlanif15', ''], ['192.168.15.254', '8ca6-df43-6b43', 'D-0', 'Eth0/0/5', '  15'], ['192.168.15.33', '7427-eae8-fef9', 'D-0', 'Eth0/0/5', '  15'], ['192.168.15.177', '4ced-fb6c-ef9f', 'D-0', 'Eth0/0/5', '  15'], ['192.168.15.200', '408d-5c8f-2aca', 'D-0', 'Eth0/0/5', '  15'], ['192.168.15.88', 'b42e-99e6-3c49', 'D-0', 'Eth0/0/5', '  15'], ['192.168.15.63', '4ced-fb41-fba5', 'D-0', 'Eth0/0/5', '  15'], ['192.168.15.231', 'b42e-999d-1f99', 'D-0', 'Eth0/0/5', '  15'], ['192.168.15.136', '70b5-e874-5732', 'D-0', 'Eth0/0/5', '  15'], ['192.168.16.1', '80fb-06c9-6db9', 'I - ', 'Vlanif16', ''], ['192.168.17.1', '80fb-06c9-6db9', 'I - ', 'Vlanif17', ''], ['192.168.17.151', '4cf5-dc97-35a9', 'D-0', 'Eth0/0/11', '  17'], ['192.168.17.23', '4cf5-dc97-3695', 'D-0', 'Eth0/0/11', '  17'], ['192.168.17.11', '4cf5-dc97-3677', 'D-0', 'Eth0/0/7', '  17'], ['192.168.17.172', '4cf5-dc97-3421', 'D-0', 'Eth0/0/7', '  17'], ['192.168.17.152', 'acb9-2f46-05f5', 'D-0', 'Eth0/0/7', '  17'], ['192.168.17.249', '849a-4059-b273', 'D-0', 'Eth0/0/7', '  17'], ['192.168.17.4', '4cf5-dc97-36b4', 'D-0', 'Eth0/0/7', '  17'], ['192.168.17.150', '44a6-42b6-c0a3', 'D-0', 'Eth0/0/7', '  17'], ['192.168.17.38', 'e0d5-5e56-7edb', 'D-0', 'Eth0/0/7', '  17'], ['192.168.17.55', 'b42e-9979-de61', 'D-0', 'Eth0/0/7', '  17'], ['192.168.17.54', '00e0-4c52-032d', 'D-0', 'Eth0/0/7', '  17'], ['192.168.18.1', '80fb-06c9-6db9', 'I - ', 'Vlanif18', ''], ['192.168.19.1', '80fb-06c9-6db9', 'I - ', 'Vlanif19', ''], ['192.168.20.1', '80fb-06c9-6db9', 'I - ', 'Vlanif20', ''], ['192.168.20.3', '4cf5-dc9a-c39e', 'D-0', 'Eth0/0/9', '  20'], ['192.168.20.188', '807c-62bb-4e1e', 'D-0', 'Eth0/0/9', '  20'], ['192.168.20.2', '4cf5-dc97-3471', 'D-0', 'Eth0/0/9', '  20'], ['192.168.20.85', 'f46d-2fcf-c3ed', 'D-0', 'Eth0/0/9', '  20'], ['192.168.20.200', '0020-6ba3-4d7c', 'D-0', 'Eth0/0/9', '  20'], ['192.168.20.64', '2428-fdc1-76e4', 'D-0', 'Eth0/0/9', '  20'], ['192.168.20.135', 'e0d5-5ef7-0e13', 'D-0', 'Eth0/0/9', '  20'], ['192.168.20.136', 'f079-596c-908a', 'D-0', 'Eth0/0/9', '  20'], ['192.168.20.182', '408d-5c1d-9e3e', 'D-0', 'Eth0/0/9', '  20'], ['192.168.20.74', 'd45d-6439-a7a3', 'D-0', 'Eth0/0/9', '  20'], ['192.168.20.66', '0c9d-920f-c668', 'D-0', 'Eth0/0/11', '  20'], ['192.168.20.116', '00e0-4c57-9160', 'D-0', 'Eth0/0/9', '  20'], ['192.168.20.134', 'e86a-642e-0446', 'D-0', 'Eth0/0/9', '  20'], ['192.168.20.101', 'a85e-45a0-0ace', 'D-0', 'Eth0/0/9', '  20'], ['192.168.20.198', '309c-23b9-101a', 'D-0', 'Eth0/0/9', '  20'], ['192.168.21.1', '80fb-06c9-6db9', 'I - ', 'Vlanif21', ''], ['192.168.22.1', '80fb-06c9-6db9', 'I - ', 'Vlanif22', ''], ['192.168.24.1', '80fb-06c9-6db9', 'I - ', 'Vlanif24', ''], ['192.168.25.1', '80fb-06c9-6db9', 'I - ', 'Vlanif25', ''], ['192.168.6.1', '80fb-06c9-6db9', 'I - ', 'Vlanif26', ''], ['192.168.6.250', '807c-6202-b8a1', 'D-0', 'Eth0/0/13', '  26'], ['192.168.6.247', '4cbd-8f90-6d54', 'D-0', 'Eth0/0/13', '  26'], ['192.168.6.16', '2428-fdc1-7333', 'D-0', 'Eth0/0/13', '  26'], ['192.168.6.3', '1012-fb7a-2656', 'D-0', 'Eth0/0/13', '  26'], ['192.168.6.5', '2428-fddc-be9d', 'D-0', 'Eth0/0/13', '  26'], ['192.168.6.59', '2428-fdc1-7698', 'D-0', 'Eth0/0/13', '  26'], ['192.168.6.164', '2428-fdc1-7699', 'D-0', 'Eth0/0/15', '  26'], ['192.168.6.9', '4cf5-dc97-343e', 'D-0', 'Eth0/0/15', '  26'], ['192.168.6.100', 'accb-51de-42e4', 'D-0', 'Eth0/0/15', '  26'], ['192.168.6.2', '4cf5-dc97-344e', 'D-0', 'Eth0/0/15', '  26'], ['192.168.6.11', '4cf5-dc97-366e', 'D-0', 'Eth0/0/15', '  26'], ['192.168.6.4', 'f000-003b-4931', 'D-0', 'Eth0/0/15', '  26'], ['192.168.6.7', 'f000-003f-669d', 'D-0', 'Eth0/0/15', '  26'], ['192.168.6.13', 'f000-006c-6648', 'D-0', 'Eth0/0/15', '  26'], ['192.168.6.155', 'fcaa-1470-f02e', 'D-0', 'Eth0/0/16', '  26'], ['192.168.6.14', 'f000-006c-6811', 'D-0', 'Eth0/0/15', '  26'], ['192.168.6.78', '94d9-b36c-2a90', 'D-0', 'Eth0/0/16', '  26'], ['192.168.6.216', '5cde-3414-a887', 'D-0', 'Eth0/0/13', '  26'], ['192.168.6.130', '4cbd-8fcc-90b6', 'D-0', 'Eth0/0/13', '  26'], ['192.168.6.18', '2428-fdc1-76c7', 'D-0', 'Eth0/0/13', '  26'], ['192.168.6.19', '2428-fdc1-76cc', 'D-0', 'Eth0/0/13', '  26'], ['192.168.6.198', '081f-7130-405c', 'D-0', 'Eth0/0/13', '  26'], ['192.168.6.168', '0017-6112-27a1', 'D-0', 'Eth0/0/13', '  26'], ['192.168.6.215', '6461-4046-fc4d', 'D-0', 'Eth0/0/13', '  26'], ['192.168.6.124', '4cbd-8fd5-da71', 'D-0', 'Eth0/0/13', '  26'], ['192.168.6.169', '70b5-e874-56e5', 'D-0', 'Eth0/0/16', '  26'], ['192.168.6.60', '00e0-4c3c-a0db', 'D-0', 'Eth0/0/16', '  26'], ['192.168.6.31', 'f4b5-203b-2404', 'D-0', 'Eth0/0/16', '  26'], ['192.168.6.65', '40b0-765f-6e47', 'D-0', 'Eth0/0/16', '  26'], ['192.168.6.45', '0c9d-92cc-8c94', 'D-0', 'Eth0/0/16', '  26'], ['192.168.6.25', '408d-5ce7-408c', 'D-0', 'Eth0/0/16', '  26'], ['192.168.6.21', 'b42e-9971-29cd', 'D-0', 'Eth0/0/16', '  26'], ['192.168.6.172', 'f4b5-203b-1eec', 'D-0', 'Eth0/0/16', '  26'], ['192.168.6.102', 'e0d5-5efc-0d5f', 'D-0', 'Eth0/0/15', '  26'], ['192.168.6.171', 'f4b5-2024-ef6b', 'D-0', 'Eth0/0/16', '  26'], ['192.168.28.1', '80fb-06c9-6db9', 'I - ', 'Vlanif28', ''], ['192.168.34.1', '80fb-06c9-6db9', 'I - ', 'Vlanif34', ''], ['192.168.34.8', 'b42e-9968-3f8c', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.78', 'e0d5-5efc-0288', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.109', 'b42e-997a-2570', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.128', 'b42e-9904-6dda', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.4', 'b42e-99e6-329b', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.203', '0017-6112-a93b', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.26', 'b42e-99ea-043c', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.211', '0017-6111-1ad0', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.243', '24cf-24a4-2da8', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.202', '0017-6112-ab50', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.90', '00e0-7070-de71', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.125', 'e0d5-5e6d-bd23', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.44', 'fcaa-1422-a331', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.107', '00e0-4cff-2c14', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.174', '081f-7150-30de', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.7', '00e0-4f03-2e24', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.166', '7405-a563-fba3', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.155', 'b42e-991d-4210', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.153', 'f484-8df7-5db7', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.205', '0017-6112-279e', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.196', '0840-f360-a0d8', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.99', 'e247-1f2c-0f6d', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.158', '00e0-4f03-c582', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.195', '5cde-34f7-014d', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.254', '5475-959c-548b', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.244', 'c06d-ed2c-d964', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.39', 'c051-7ea4-099f', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.206', '7486-e218-0a99', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.64', '2428-fdc1-76d0', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.47', '70b5-e874-5844', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.77', '309c-237d-6c73', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.71', '70b5-e874-4644', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.227', 'b42e-9944-2e6e', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.176', '00e0-4c85-826d', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.150', '6045-cb7f-c902', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.191', '74d4-356d-891e', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.188', 'b42e-997a-2550', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.111', 'f4b5-2024-f365', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.72', 'e0d5-5e51-ea27', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.79', 'f4b5-2024-f44c', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.81', 'f4b5-2024-ebaf', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.180', 'f4b5-2024-f19b', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.75', 'f4b5-203b-1e44', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.84', '00e0-4c37-ace4', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.212', '7486-e218-1afe', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.74', 'e0d5-5ec3-191d', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.182', 'fcaa-140d-3103', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.147', 'a85e-45a0-0b0e', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.56', '00e0-4d95-1326', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.46', '8469-9386-4585', 'D-0', 'Eth0/0/11', '  34'], ['192.168.34.121', '408d-5cfd-e739', 'D-0', 'Eth0/0/11', '  34'], ['192.168.87.1', '80fb-06c9-6db9', 'I - ', 'Vlanif87', ''], ['192.168.87.97', 'f000-003f-58bf', 'D-0', 'Eth0/0/11', '  87'], ['192.168.87.25', 'f000-003f-669c', 'D-0', 'Eth0/0/11', '  87'], ['192.168.87.250', '8ce7-486e-bf80', 'D-0', 'Eth0/0/11', '  87'], ['192.168.87.12', 'Incomplete', 'D-0', 'Eth0/0/1', '  87'], ['192.168.87.6', 'Incomplete', 'D-0', 'Eth0/0/1', '  87'], ['192.168.88.1', '80fb-06c9-6db9', 'I - ', 'Vlanif88', ''], ['192.168.88.253', '4cbd-8f90-7198', 'D-0', 'Eth0/0/11', '  88'], ['192.168.88.254', '686d-bcf6-0e91', 'D-0', 'Eth0/0/11', '  88'], ['192.168.88.131', '2428-fdc1-76a4', 'D-0', 'Eth0/0/11', '  88'], ['192.168.88.251', '4cbd-8f90-71a7', 'D-0', 'Eth0/0/11', '  88'], ['192.168.88.250', '4cbd-8f90-719c', 'D-0', 'Eth0/0/11', '  88'], ['192.168.88.7', 'Incomplete', 'D-0', 'Eth0/0/1', '  88'], ['192.168.88.160', 'Incomplete', 'D-0', 'Eth0/0/1', '  88'], ['192.168.88.24', 'Incomplete', 'D-0', 'Eth0/0/1', '  88'], ['192.168.0.1', '80fb-06c9-6db9', 'I - ', 'Vlanif100', ''], ['192.168.0.45', '2cea-7feb-b118', 'D-0', 'Eth0/0/20', '  100'], ['192.168.0.252', 'f4ee-0823-956a', 'D-0', 'Eth0/0/24', '  100'], ['192.168.0.177', '9ca6-15d8-f7a2', 'D-0', 'Eth0/0/24', '  100'], ['192.168.0.107', '2cea-7fed-051c', 'D-0', 'Eth0/0/24', '  100'], ['192.168.0.99', '000c-294d-77f6', 'D-0', 'Eth0/0/24', '  100'], ['192.168.0.189', '8ca6-dfc4-490d', 'D-0', 'Eth0/0/24', '  100'], ['192.168.0.11', '0017-6112-b286', 'D-0', 'Eth0/0/24', '  100'], ['192.168.0.121', 'f4b5-2018-50e7', 'D-0', 'Eth0/0/24', '  100'], ['192.168.0.122', 'e0d5-5efa-1b79', 'D-0', 'Eth0/0/24', '  100'], ['10.0.0.2', '80fb-06c9-6db9', 'I - ', 'Vlanif200', ''], ['10.0.0.1', '0c82-6858-7222', 'D-0', 'GE0/0/3', '  200'], ['192.168.201.1', '80fb-06c9-6db9', 'I - ', 'Vlanif201', '']]\n"
     ]
    }
   ],
   "source": [
    "\n",
    "\n",
    "output = '''\n",
    "                  display arp\n",
    "IP ADDRESS      MAC ADDRESS  EXPIRE(M) TYPE INTERFACE      VPN-INSTANCE         VLAN \n",
    "------------------------------------------------------------------------------\n",
    "192.168.11.1    80fb-06c9-6db9         I -  Vlanif11\n",
    "192.168.11.199  b42e-9968-4090  11     D-0  Eth0/0/1  11\n",
    "192.168.88.253  4cbd-8f90-7198  1      D-0  Eth0/0/11  88\n",
    "192.168.88.161  Incomplete      0      D-0  Eth0/0/1  88\n",
    "192.168.88.253  4cbd-8f90-7198  1      D-0  Eth0/0/11  88\n",
    "192.168.88.161  Incomplete      0      D-0  Eth0/0/1  88\n",
    "192.168.88.52   Incomplete      0      D-0  Eth0/0/1  88\n",
    "192.168.0.1     80fb-06c9-6db9         I -  Vlanif100\n",
    "192.168.0.45    2cea-7feb-b118  20     D-0  Eth0/0/20  100\n",
    "192.168.0.252   f4ee-0823-956a  20     D-0  Eth0/0/24  100\n",
    "192.168.0.177   9ca6-15d8-f7a2  20     D-0  Eth0/0/24  100\n",
    "192.168.0.107   2cea-7fed-051c  18     D-0  Eth0/0/24  100\n",
    "192.168.0.99    e0d5-5efa-1b79  20     D-0  Eth0/0/24  100\n",
    "192.168.0.189   8ca6-dfc4-490d  20     D-0  Eth0/0/24  100\n",
    "192.168.0.11    0017-6112-b286  20     D-0  Eth0/0/24  100\n",
    "192.168.0.114   f4b5-2018-50e7  20     D-0  Eth0/0/24  100\n",
    "10.0.0.2        80fb-06c9-6db9         I -  Vlanif200\n",
    "10.0.0.1        0c82-6858-7222  20     D-0  GE0/0/3  200\n",
    "192.168.201.1   80fb-06c9-6db9         I -  Vlanif201\n",
    "------------------------------------------------------------------------------\n",
    "Total:173       Dynamic:151     Static:0    Interface:22   \n",
    "<3700>    \n",
    "'''\n",
    "\n",
    "f = open('display-arp.template')\n",
    "template = TextFSM(f)\n",
    "outTab = template.ParseText(tabStr)\n",
    "print (outTab)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 26,
   "id": "d29caa35",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "169"
      ]
     },
     "execution_count": 26,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(outTab)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 27,
   "id": "3dce0c49",
   "metadata": {},
   "outputs": [],
   "source": [
    "def hwArpRows(tabStr,tpl=\"display-arp.template\"):\n",
    "    f = open(tpl)\n",
    "    template = TextFSM(f)\n",
    "    outTab = template.ParseText(tabStr)\n",
    "    return  outTab\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 28,
   "id": "3ca73156",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "display arp\r\n",
      "IP ADDRESS      MAC ADDRESS  EXPIRE(M) TYPE INTERFACE      VPN-INSTANCE         VLAN \r\n",
      "------------------------------------------------------------------------------\r\n",
      "192.168.11.1    80fb-06c9-6db9         I -  Vlanif11\r\n",
      "192.168.11.199  b42e-9968-4090  9      D-0  Eth0/0/1  11\r\n",
      "192.168.11.30   4419-b641-7795  9      D-0  Eth0/0/1  11\r\n",
      "192.168.11.189  0800-2740-3822  9      D-0  Eth0/0/1  11\r\n",
      "192.168.12.1    80fb-06c9-6db9         I -  Vlanif12\r\n",
      "192.168.13.1    80fb-06c9-6db9         I -  Vlanif13\r\n",
      "192.168.14.1    80fb-06c9-6db9         I -  Vlanif14\r\n",
      "192.168.14.13   8269-c0e2-cbe1  4      D-0  Eth0/0/11  14\r\n",
      "192.168.15.1    80fb-06c9-6db9         I -  Vlanif15\r\n",
      "192.168.15.254  8ca6-df43-6b43  9      D-0  Eth0/0/5  15\r\n",
      "192.168.15.33   7427-eae8-fef9  9      D-0  Eth0/0/5  15\r\n",
      "192.168.15.177  4ced-fb6c-ef9f  9      D-0  Eth0/0/5  15\r\n",
      "192.168.15.200  408d-5c8f-2aca  9      D-0  Eth0/0/5  15\r\n",
      "192.168.15.88   b42e-99e6-3c49  17     D-0  Eth0/0/5  15\r\n",
      "192.168.15.63   4ced-fb41-fba5  17     D-0  Eth0/0/5  15\r\n",
      "192.168.15.231  b42e-999d-1f99  1      D-0  Eth0/0/5  15\r\n",
      "192.168.15.136  70b5-e874-5732  7      D-0  Eth0/0/5  15\r\n",
      "192.168.16.1    80fb-06c9-6db9         I -  Vlanif16\r\n",
      "192.168.17.1    80fb-06c9-6db9         I -  Vlanif17\r\n",
      "192.168.17.151  4cf5-dc97-35a9  9      D-0  Eth0/0/11  17\r\n",
      "192.168.17.23   4cf5-dc97-3695  9      D-0  Eth0/0/11  17\r\n",
      "192.168.17.11   4cf5-dc97-3677  9      D-0  Eth0/0/7  17\r\n",
      "192.168.17.172  4cf5-dc97-3421  9      D-0  Eth0/0/7  17\r\n",
      "192.168.17.152  acb9-2f46-05f5  9      D-0  Eth0/0/7  17\r\n",
      "192.168.17.249  849a-4059-b273  9      D-0  Eth0/0/7  17\r\n",
      "192.168.17.4    4cf5-dc97-36b4  9      D-0  Eth0/0/7  17\r\n",
      "192.168.17.150  44a6-42b6-c0a3  9      D-0  Eth0/0/7  17\r\n",
      "192.168.17.38   e0d5-5e56-7edb  6      D-0  Eth0/0/7  17\r\n",
      "192.168.17.55   b42e-9979-de61  18     D-0  Eth0/0/7  17\r\n",
      "192.168.17.54   00e0-4c52-032d  18     D-0  Eth0/0/7  17\r\n",
      "192.168.18.1    80fb-06c9-6db9         I -  Vlanif18\r\n",
      "192.168.19.1    80fb-06c9-6db9         I -  Vlanif19\r\n",
      "192.168.20.1    80fb-06c9-6db9         I -  Vlanif20\r\n",
      "192.168.20.3    4cf5-dc9a-c39e  9      D-0  Eth0/0/9  20\r\n",
      "192.168.20.188  807c-62bb-4e1e  9      D-0  Eth0/0/9  20\r\n",
      "192.168.20.2    4cf5-dc97-3471  9      D-0  Eth0/0/9  20\r\n",
      "192.168.20.85   f46d-2fcf-c3ed  9      D-0  Eth0/0/9  20\r\n",
      "192.168.20.200  0020-6ba3-4d7c  9      D-0  Eth0/0/9  20\r\n",
      "192.168.20.64   2428-fdc1-76e4  9      D-0  Eth0/0/9  20\r\n",
      "192.168.20.135  e0d5-5ef7-0e13  3      D-0  Eth0/0/9  20\r\n",
      "192.168.20.136  f079-596c-908a  3      D-0  Eth0/0/9  20\r\n",
      "192.168.20.182  408d-5c1d-9e3e  13     D-0  Eth0/0/9  20\r\n",
      "192.168.20.74   d45d-6439-a7a3  7      D-0  Eth0/0/9  20\r\n",
      "192.168.20.66   0c9d-920f-c668  8      D-0  Eth0/0/11  20\r\n",
      "192.168.20.116  00e0-4c57-9160  10     D-0  Eth0/0/9  20\r\n",
      "192.168.20.134  e86a-642e-0446  10     D-0  Eth0/0/9  20\r\n",
      "192.168.20.101  a85e-45a0-0ace  12     D-0  Eth0/0/9  20\r\n",
      "192.168.20.198  309c-23b9-101a  16     D-0  Eth0/0/9  20\r\n",
      "192.168.21.1    80fb-06c9-6db9         I -  Vlanif21\r\n",
      "192.168.22.1    80fb-06c9-6db9         I -  Vlanif22\r\n",
      "192.168.24.1    80fb-06c9-6db9         I -  Vlanif24\r\n",
      "192.168.25.1    80fb-06c9-6db9         I -  Vlanif25\r\n",
      "192.168.6.1     80fb-06c9-6db9         I -  Vlanif26\r\n",
      "192.168.6.250   807c-6202-b8a1  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.247   4cbd-8f90-6d54  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.16    2428-fdc1-7333  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.3     1012-fb7a-2656  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.5     2428-fddc-be9d  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.59    2428-fdc1-7698  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.164   2428-fdc1-7699  9      D-0  Eth0/0/15  26\r\n",
      "192.168.6.9     4cf5-dc97-343e  9      D-0  Eth0/0/15  26\r\n",
      "192.168.6.100   accb-51de-42e4  9      D-0  Eth0/0/15  26\r\n",
      "192.168.6.2     4cf5-dc97-344e  9      D-0  Eth0/0/15  26\r\n",
      "192.168.6.11    4cf5-dc97-366e  9      D-0  Eth0/0/15  26\r\n",
      "192.168.6.4     f000-003b-4931  9      D-0  Eth0/0/15  26\r\n",
      "192.168.6.7     f000-003f-669d  9      D-0  Eth0/0/15  26\r\n",
      "192.168.6.13    f000-006c-6648  9      D-0  Eth0/0/15  26\r\n",
      "192.168.6.155   fcaa-1470-f02e  9      D-0  Eth0/0/16  26\r\n",
      "192.168.6.14    f000-006c-6811  9      D-0  Eth0/0/15  26\r\n",
      "192.168.6.78    94d9-b36c-2a90  9      D-0  Eth0/0/16  26\r\n",
      "192.168.6.216   5cde-3414-a887  6      D-0  Eth0/0/13  26\r\n",
      "192.168.6.130   4cbd-8fcc-90b6  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.18    2428-fdc1-76c7  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.19    2428-fdc1-76cc  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.198   081f-7130-405c  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.168   0017-6112-27a1  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.215   6461-4046-fc4d  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.124   4cbd-8fd5-da71  9      D-0  Eth0/0/13  26\r\n",
      "192.168.6.169   70b5-e874-56e5  1      D-0  Eth0/0/16  26\r\n",
      "192.168.6.60    00e0-4c3c-a0db  7      D-0  Eth0/0/16  26\r\n",
      "192.168.6.31    f4b5-203b-2404  10     D-0  Eth0/0/16  26\r\n",
      "192.168.6.65    40b0-765f-6e47  12     D-0  Eth0/0/16  26\r\n",
      "192.168.6.45    0c9d-92cc-8c94  3      D-0  Eth0/0/16  26\r\n",
      "192.168.6.25    408d-5ce7-408c  14     D-0  Eth0/0/16  26\r\n",
      "192.168.6.21    b42e-9971-29cd  6      D-0  Eth0/0/16  26\r\n",
      "192.168.6.172   f4b5-203b-1eec  9      D-0  Eth0/0/16  26\r\n",
      "192.168.6.102   e0d5-5efc-0d5f  12     D-0  Eth0/0/15  26\r\n",
      "192.168.6.171   f4b5-2024-ef6b  6      D-0  Eth0/0/16  26\r\n",
      "192.168.28.1    80fb-06c9-6db9         I -  Vlanif28\r\n",
      "192.168.34.1    80fb-06c9-6db9         I -  Vlanif34\r\n",
      "192.168.34.8    b42e-9968-3f8c  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.78   e0d5-5efc-0288  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.109  b42e-997a-2570  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.128  b42e-9904-6dda  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.4    b42e-99e6-329b  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.203  0017-6112-a93b  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.26   b42e-99ea-043c  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.211  0017-6111-1ad0  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.243  24cf-24a4-2da8  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.202  0017-6112-ab50  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.90   00e0-7070-de71  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.125  e0d5-5e6d-bd23  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.44   fcaa-1422-a331  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.107  00e0-4cff-2c14  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.174  081f-7150-30de  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.7    00e0-4f03-2e24  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.166  7405-a563-fba3  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.155  b42e-991d-4210  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.153  f484-8df7-5db7  9      D-0  Eth0/0/11  34\r\n",
      "192.168.34.205  0017-6112-279e  16     D-0  Eth0/0/11  34\r\n",
      "192.168.34.196  0840-f360-a0d8  17     D-0  Eth0/0/11  34\r\n",
      "192.168.34.99   e247-1f2c-0f6d  19     D-0  Eth0/0/11  34\r\n",
      "192.168.34.158  00e0-4f03-c582  12     D-0  Eth0/0/11  34\r\n",
      "192.168.34.195  5cde-34f7-014d  18     D-0  Eth0/0/11  34\r\n",
      "192.168.34.254  5475-959c-548b  19     D-0  Eth0/0/11  34\r\n",
      "192.168.34.244  c06d-ed2c-d964  19     D-0  Eth0/0/11  34\r\n",
      "192.168.34.39   c051-7ea4-099f  19     D-0  Eth0/0/11  34\r\n",
      "192.168.34.206  7486-e218-0a99  19     D-0  Eth0/0/11  34\r\n",
      "192.168.34.64   2428-fdc1-76d0  19     D-0  Eth0/0/11  34\r\n",
      "192.168.34.47   70b5-e874-5844  3      D-0  Eth0/0/11  34\r\n",
      "192.168.34.77   309c-237d-6c73  1      D-0  Eth0/0/11  34\r\n",
      "192.168.34.71   70b5-e874-4644  10     D-0  Eth0/0/11  34\r\n",
      "192.168.34.227  b42e-9944-2e6e  13     D-0  Eth0/0/11  34\r\n",
      "192.168.34.176  00e0-4c85-826d  13     D-0  Eth0/0/11  34\r\n",
      "192.168.34.150  6045-cb7f-c902  14     D-0  Eth0/0/11  34\r\n",
      "192.168.34.191  74d4-356d-891e  16     D-0  Eth0/0/11  34\r\n",
      "192.168.34.188  b42e-997a-2550  17     D-0  Eth0/0/11  34\r\n",
      "192.168.34.111  f4b5-2024-f365  19     D-0  Eth0/0/11  34\r\n",
      "192.168.34.72   e0d5-5e51-ea27  19     D-0  Eth0/0/11  34\r\n",
      "192.168.34.79   f4b5-2024-f44c  19     D-0  Eth0/0/11  34\r\n",
      "192.168.34.81   f4b5-2024-ebaf  13     D-0  Eth0/0/11  34\r\n",
      "192.168.34.180  f4b5-2024-f19b  20     D-0  Eth0/0/11  34\r\n",
      "192.168.34.75   f4b5-203b-1e44  20     D-0  Eth0/0/11  34\r\n",
      "192.168.34.84   00e0-4c37-ace4  3      D-0  Eth0/0/11  34\r\n",
      "192.168.34.212  7486-e218-1afe  10     D-0  Eth0/0/11  34\r\n",
      "192.168.34.74   e0d5-5ec3-191d  12     D-0  Eth0/0/11  34\r\n",
      "192.168.34.182  fcaa-140d-3103  12     D-0  Eth0/0/11  34\r\n",
      "192.168.34.147  a85e-45a0-0b0e  1      D-0  Eth0/0/11  34\r\n",
      "192.168.34.56   00e0-4d95-1326  2      D-0  Eth0/0/11  34\r\n",
      "192.168.34.46   8469-9386-4585  3      D-0  Eth0/0/11  34\r\n",
      "192.168.34.121  408d-5cfd-e739  12     D-0  Eth0/0/11  34\r\n",
      "192.168.87.1    80fb-06c9-6db9         I -  Vlanif87\r\n",
      "192.168.87.97   f000-003f-58bf  9      D-0  Eth0/0/11  87\r\n",
      "192.168.87.25   f000-003f-669c  9      D-0  Eth0/0/11  87\r\n",
      "192.168.87.250  8ce7-486e-bf80  9      D-0  Eth0/0/11  87\r\n",
      "192.168.87.12   Incomplete      0      D-0  Eth0/0/1  87\r\n",
      "192.168.87.6    Incomplete      1      D-0  Eth0/0/1  87\r\n",
      "192.168.88.1    80fb-06c9-6db9         I -  Vlanif88\r\n",
      "192.168.88.253  4cbd-8f90-7198  9      D-0  Eth0/0/11  88\r\n",
      "192.168.88.254  686d-bcf6-0e91  9      D-0  Eth0/0/11  88\r\n",
      "192.168.88.131  2428-fdc1-76a4  9      D-0  Eth0/0/11  88\r\n",
      "192.168.88.251  4cbd-8f90-71a7  9      D-0  Eth0/0/11  88\r\n",
      "192.168.88.250  4cbd-8f90-719c  9      D-0  Eth0/0/11  88\r\n",
      "192.168.88.7    Incomplete      0      D-0  Eth0/0/1  88\r\n",
      "192.168.88.160  Incomplete      0      D-0  Eth0/0/1  88\r\n",
      "192.168.88.24   Incomplete      1      D-0  Eth0/0/1  88\r\n",
      "192.168.0.1     80fb-06c9-6db9         I -  Vlanif100\r\n",
      "192.168.0.45    2cea-7feb-b118  9      D-0  Eth0/0/20  100\r\n",
      "192.168.0.252   f4ee-0823-956a  9      D-0  Eth0/0/24  100\r\n",
      "192.168.0.177   9ca6-15d8-f7a2  9      D-0  Eth0/0/24  100\r\n",
      "192.168.0.107   2cea-7fed-051c  9      D-0  Eth0/0/24  100\r\n",
      "192.168.0.99    000c-294d-77f6  9      D-0  Eth0/0/24  100\r\n",
      "192.168.0.189   8ca6-dfc4-490d  9      D-0  Eth0/0/24  100\r\n",
      "192.168.0.11    0017-6112-b286  9      D-0  Eth0/0/24  100\r\n",
      "192.168.0.121   f4b5-2018-50e7  9      D-0  Eth0/0/24  100\r\n",
      "192.168.0.122   e0d5-5efa-1b79  9      D-0  Eth0/0/24  100\r\n",
      "10.0.0.2        80fb-06c9-6db9         I -  Vlanif200\r\n",
      "10.0.0.1        0c82-6858-7222  9      D-0  GE0/0/3  200\r\n",
      "192.168.201.1   80fb-06c9-6db9         I -  Vlanif201\r\n",
      "------------------------------------------------------------------------------\r\n",
      "Total:169       Dynamic:147     Static:0    Interface:22   \r\n",
      "<3700>\n"
     ]
    }
   ],
   "source": [
    "print(tabStr)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 88,
   "id": "d00a559f",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(1, <re.Match object; span=(1726, 1743), match=b'\\r\\r\\n---- More ----'>, b' display mac-address\\r\\r\\nMAC Address      VLAN ID    State            Port/NickName            Aging\\r\\r\\nb83a-080e-f650   2          Learned          GE1/0/9                  Y\\r\\r\\n04f9-f816-6b61   11         Learned          GE1/0/11                 Y\\r\\r\\n3c6a-4852-c1fe   11         Learned          GE1/0/11                 Y\\r\\r\\n4419-b641-7795   11         Learned          GE1/0/3                  Y\\r\\r\\n5254-0033-e4b7   11         Learned          GE1/0/1                  Y\\r\\r\\n5254-00c1-4efa   11         Learned          GE1/0/1                  Y\\r\\r\\n5254-00d4-636c   11         Learned          GE1/0/1                  Y\\r\\r\\n5869-6c01-dd73   11         Learned          GE1/0/1                  Y\\r\\r\\n5cc9-99ea-55e0   11         Learned          GE1/0/11                 Y\\r\\r\\n80fb-06c9-6db9   11         Learned          GE1/0/2                  Y\\r\\r\\n9ca6-15d8-f7a2   11         Learned          GE1/0/1                  Y\\r\\r\\nacb9-2f24-2384   11         Learned          GE1/0/1                  Y\\r\\r\\nb42e-9968-4090   11         Learned          GE1/0/3                  Y\\r\\r\\ne0d5-5efa-1b79   11         Learned          GE1/0/1                  Y\\r\\r\\n020f-ed77-7960   14         Learned          GE1/0/11                 Y\\r\\r\\n80fb-06c9-6db9   14         Learned          GE1/0/2                  Y\\r\\r\\n4ced-fb6c-ef9f   15         Learned          GE1/0/5                  Y\\r\\r\\n7427-eae8-fef9   15         Learned          GE1/0/5                  Y\\r\\r\\n80fb-06c9-6db9   15         Learned          GE1/0/2                  Y\\r\\r\\n8ca6-df43-6b43   15         Learned          GE1/0/5                  Y\\r\\r\\nb42e-999d-1f99   15         Learned          GE1/0/5                  Y\\r\\r\\nb42e-99e6-3c49   15         Learned          GE1/0/5                  Y\\r\\r\\n---- More ----')\n",
      "(1, <re.Match object; span=(1717, 1734), match=b'\\r\\r\\n---- More ----'>, b'\\r\\r               \\r00e0-4c52-032d   17         Learned          GE1/0/7                  Y\\r\\r\\n44a6-42b6-c0a3   17         Learned          GE1/0/7                  Y\\r\\r\\n4cf5-dc97-3421   17         Learned          GE1/0/7                  Y\\r\\r\\n4cf5-dc97-35a9   17         Learned          GE1/0/11                 Y\\r\\r\\n4cf5-dc97-3677   17         Learned          GE1/0/7                  Y\\r\\r\\n4cf5-dc97-3695   17         Learned          GE1/0/11                 Y\\r\\r\\n4cf5-dc97-36b4   17         Learned          GE1/0/7                  Y\\r\\r\\n80fb-06c9-6db9   17         Learned          GE1/0/2                  Y\\r\\r\\n849a-4059-b273   17         Learned          GE1/0/7                  Y\\r\\r\\nacb9-2f46-05f5   17         Learned          GE1/0/7                  Y\\r\\r\\nb42e-9979-de61   17         Learned          GE1/0/7                  Y\\r\\r\\ne0d5-5e56-7edb   17         Learned          GE1/0/7                  Y\\r\\r\\n0020-6bb3-b6d7   20         Learned          GE1/0/9                  Y\\r\\r\\n2428-fdc1-76e4   20         Learned          GE1/0/9                  Y\\r\\r\\n309c-2365-209e   20         Learned          GE1/0/9                  Y\\r\\r\\n3c6a-4838-ecd5   20         Learned          GE1/0/9                  Y\\r\\r\\n408d-5c1d-9e3e   20         Learned          GE1/0/9                  Y\\r\\r\\n4cf5-dc97-3471   20         Learned          GE1/0/9                  Y\\r\\r\\n4cf5-dc9a-c39e   20         Learned          GE1/0/9                  Y\\r\\r\\n807c-62bb-4e1e   20         Learned          GE1/0/9                  Y\\r\\r\\n80fb-06c9-6db9   20         Learned          GE1/0/2                  Y\\r\\r\\n8811-96af-173e   20         Learned          GE1/0/9                  Y\\r\\r\\nb221-0304-e64b   20         Learned          GE1/0/9                  Y\\r\\r\\n---- More ----')\n",
      "(1, <re.Match object; span=(1717, 1734), match=b'\\r\\r\\n---- More ----'>, b'\\r\\r               \\rc85b-7669-9e16   20         Learned          GE1/0/9                  Y\\r\\r\\ne0d5-5ef6-fdd6   20         Learned          GE1/0/9                  Y\\r\\r\\nf46d-2fcf-c3ed   20         Learned          GE1/0/9                  Y\\r\\r\\n0017-6111-f5e7   26         Learned          GE1/0/13                 Y\\r\\r\\n0030-1bba-02db   26         Learned          GE1/0/15                 Y\\r\\r\\n00e0-4c3c-a0db   26         Learned          GE1/0/16                 Y\\r\\r\\n081f-7130-405c   26         Learned          GE1/0/13                 Y\\r\\r\\n0c9d-92cc-8c94   26         Learned          GE1/0/16                 Y\\r\\r\\n1012-fb7a-2656   26         Learned          GE1/0/13                 Y\\r\\r\\n2428-fdc1-7333   26         Learned          GE1/0/13                 Y\\r\\r\\n2428-fdc1-7699   26         Learned          GE1/0/15                 Y\\r\\r\\n2428-fdc1-76c7   26         Learned          GE1/0/13                 Y\\r\\r\\n2428-fdc1-76cc   26         Learned          GE1/0/13                 Y\\r\\r\\n2428-fddc-be9d   26         Learned          GE1/0/13                 Y\\r\\r\\n408d-5ce7-408c   26         Learned          GE1/0/16                 Y\\r\\r\\n4cb0-0810-6c1e   26         Learned          GE1/0/13                 Y\\r\\r\\n4cbd-8f2c-9592   26         Learned          GE1/0/13                 Y\\r\\r\\n4cbd-8f90-6d54   26         Learned          GE1/0/13                 Y\\r\\r\\n4cbd-8fcc-90b6   26         Learned          GE1/0/13                 Y\\r\\r\\n4cbd-8fd5-da71   26         Learned          GE1/0/13                 Y\\r\\r\\n4cf5-dc97-343e   26         Learned          GE1/0/15                 Y\\r\\r\\n4cf5-dc97-344e   26         Learned          GE1/0/15                 Y\\r\\r\\n4cf5-dc97-366e   26         Learned          GE1/0/15                 Y\\r\\r\\n---- More ----')\n",
      "(1, <re.Match object; span=(1717, 1734), match=b'\\r\\r\\n---- More ----'>, b'\\r\\r               \\r5cde-3414-a887   26         Learned          GE1/0/13                 Y\\r\\r\\n6461-4046-fc4d   26         Learned          GE1/0/13                 Y\\r\\r\\n807c-6202-b8a1   26         Learned          GE1/0/13                 Y\\r\\r\\n80fb-06c9-6db9   26         Learned          GE1/0/2                  Y\\r\\r\\na85e-455a-5a7c   26         Learned          GE1/0/16                 Y\\r\\r\\na85e-45a2-e00a   26         Learned          GE1/0/16                 Y\\r\\r\\naccb-51de-42e4   26         Learned          GE1/0/15                 Y\\r\\r\\nb42e-9971-29cd   26         Learned          GE1/0/16                 Y\\r\\r\\nb42e-99ea-043c   26         Learned          GE1/0/15                 Y\\r\\r\\ne062-908d-9995   26         Learned          GE1/0/11                 Y\\r\\r\\ne062-90bb-c9b5   26         Learned          GE1/0/11                 Y\\r\\r\\ne062-90bb-da7a   26         Learned          GE1/0/11                 Y\\r\\r\\nf000-003b-4931   26         Learned          GE1/0/15                 Y\\r\\r\\nf000-003f-669d   26         Learned          GE1/0/15                 Y\\r\\r\\nf000-006c-6648   26         Learned          GE1/0/15                 Y\\r\\r\\nf000-006c-6811   26         Learned          GE1/0/15                 Y\\r\\r\\nf4b5-2024-ef6b   26         Learned          GE1/0/16                 Y\\r\\r\\nfcaa-1470-f02e   26         Learned          GE1/0/16                 Y\\r\\r\\n0017-6111-1ad0   34         Learned          GE1/0/11                 Y\\r\\r\\n0017-6112-279e   34         Learned          GE1/0/11                 Y\\r\\r\\n0017-6112-a93b   34         Learned          GE1/0/11                 Y\\r\\r\\n0017-6112-ab50   34         Learned          GE1/0/11                 Y\\r\\r\\n00d8-610c-3d58   34         Learned          GE1/0/11                 Y\\r\\r\\n---- More ----')\n",
      "(1, <re.Match object; span=(1717, 1734), match=b'\\r\\r\\n---- More ----'>, b'\\r\\r               \\r00e0-0b48-a717   34         Learned          GE1/0/11                 Y\\r\\r\\n00e0-4c85-826d   34         Learned          GE1/0/11                 Y\\r\\r\\n00e0-4cff-2c14   34         Learned          GE1/0/11                 Y\\r\\r\\n00e0-4d95-1326   34         Learned          GE1/0/11                 Y\\r\\r\\n00e0-4f03-2e24   34         Learned          GE1/0/11                 Y\\r\\r\\n00e0-4f03-c582   34         Learned          GE1/0/11                 Y\\r\\r\\n0840-f360-a0d8   34         Learned          GE1/0/11                 Y\\r\\r\\n2428-fdc1-76d0   34         Learned          GE1/0/11                 Y\\r\\r\\n309c-237d-6c73   34         Learned          GE1/0/11                 Y\\r\\r\\n408d-5cfd-e739   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-83af   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-8498   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-8575   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-85b6   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-8609   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-8619   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-86fc   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-86fd   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-8705   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-8706   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-8709   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-870a   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-870f   34         Learned          GE1/0/11                 Y\\r\\r\\n---- More ----')\n",
      "(1, <re.Match object; span=(1717, 1734), match=b'\\r\\r\\n---- More ----'>, b'\\r\\r               \\r4419-b649-8714   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-8716   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-8717   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-8718   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-871c   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-87da   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-87f4   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f2c-9572   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f2c-9597   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f79-1968   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f79-19ac   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f79-19ca   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f79-1b2a   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f79-1b53   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f79-1b76   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f79-1b7a   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f79-1b80   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f79-1b84   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8fba-d012   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8fba-d022   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8fcc-9024   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8fcc-90b8   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8fd3-2aa9   34         Learned          GE1/0/11                 Y\\r\\r\\n---- More ----')\n"
     ]
    },
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "(1, <re.Match object; span=(1717, 1734), match=b'\\r\\r\\n---- More ----'>, b'\\r\\r               \\r4cbd-8fd5-da70   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8fd5-da85   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8fd5-dab0   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8fd5-dab2   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8fd5-db1e   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8fd5-dbd4   34         Learned          GE1/0/11                 Y\\r\\r\\n5475-959c-548b   34         Learned          GE1/0/11                 Y\\r\\r\\n5850-ed6d-2f60   34         Learned          GE1/0/11                 Y\\r\\r\\n5850-ed6d-2f7b   34         Learned          GE1/0/11                 Y\\r\\r\\n5869-6c01-dd73   34         Learned          GE1/0/11                 Y\\r\\r\\n70b5-e874-4644   34         Learned          GE1/0/11                 Y\\r\\r\\n7486-e218-0a99   34         Learned          GE1/0/11                 Y\\r\\r\\n7486-e218-1afe   34         Learned          GE1/0/11                 Y\\r\\r\\n74d4-356d-891e   34         Learned          GE1/0/11                 Y\\r\\r\\n80fb-06c9-6db9   34         Learned          GE1/0/2                  Y\\r\\r\\nb42e-9904-6dda   34         Learned          GE1/0/11                 Y\\r\\r\\nb42e-991d-4210   34         Learned          GE1/0/11                 Y\\r\\r\\nb42e-9968-3f8c   34         Learned          GE1/0/11                 Y\\r\\r\\nb42e-997a-2550   34         Learned          GE1/0/11                 Y\\r\\r\\nb42e-997a-2570   34         Learned          GE1/0/11                 Y\\r\\r\\nb42e-99e6-329b   34         Learned          GE1/0/11                 Y\\r\\r\\nc051-7ea4-099f   34         Learned          GE1/0/11                 Y\\r\\r\\nc06d-ed2c-d964   34         Learned          GE1/0/11                 Y\\r\\r\\n---- More ----')\n",
      "(1, <re.Match object; span=(1717, 1734), match=b'\\r\\r\\n---- More ----'>, b'\\r\\r               \\re062-902f-e906   34         Learned          GE1/0/11                 Y\\r\\r\\ne062-9032-a966   34         Learned          GE1/0/11                 Y\\r\\r\\ne062-9082-2258   34         Learned          GE1/0/11                 Y\\r\\r\\ne062-9087-a15a   34         Learned          GE1/0/11                 Y\\r\\r\\ne062-908a-bdc9   34         Learned          GE1/0/11                 Y\\r\\r\\ne062-90b0-4b6a   34         Learned          GE1/0/11                 Y\\r\\r\\ne062-90c9-1712   34         Learned          GE1/0/11                 Y\\r\\r\\ne062-90dd-0803   34         Learned          GE1/0/11                 Y\\r\\r\\ne062-90eb-0492   34         Learned          GE1/0/11                 Y\\r\\r\\ne062-90f6-66b9   34         Learned          GE1/0/11                 Y\\r\\r\\ne0d5-5e6d-bd23   34         Learned          GE1/0/11                 Y\\r\\r\\ne0d5-5ec3-191d   34         Learned          GE1/0/11                 Y\\r\\r\\ne0d5-5efc-0288   34         Learned          GE1/0/11                 Y\\r\\r\\ne247-1f2c-0f6d   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003a-beab   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003a-beaf   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003a-beb3   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003a-bec0   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003a-bec5   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003a-bee5   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003b-4854   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003b-485d   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003b-487f   34         Learned          GE1/0/11                 Y\\r\\r\\n---- More ----')\n",
      "(1, <re.Match object; span=(1717, 1734), match=b'\\r\\r\\n---- More ----'>, b'\\r\\r               \\rf000-003b-489a   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003b-48a1   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003b-4935   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003b-494a   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003f-589e   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003f-64a8   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-006b-da3e   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-006c-8155   34         Learned          GE1/0/11                 Y\\r\\r\\nf484-8df7-5db7   34         Learned          GE1/0/11                 Y\\r\\r\\nfcaa-1422-a331   34         Learned          GE1/0/11                 Y\\r\\r\\n80fb-06c9-6db9   87         Learned          GE1/0/2                  Y\\r\\r\\n8ce7-486e-bf80   87         Learned          GE1/0/11                 Y\\r\\r\\nf000-003f-58bf   87         Learned          GE1/0/11                 Y\\r\\r\\nf000-003f-669c   87         Learned          GE1/0/11                 Y\\r\\r\\n2428-fdc1-76a4   88         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f2c-957c   88         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f90-7198   88         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f90-719c   88         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f90-71a7   88         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8fd5-da6e   88         Learned          GE1/0/11                 Y\\r\\r\\n686d-bcf6-0e91   88         Learned          GE1/0/11                 Y\\r\\r\\n80fb-06c9-6db9   88         Learned          GE1/0/2                  Y\\r\\r\\n0017-6112-b286   100        Learned          GE1/0/24                 Y\\r\\r\\n---- More ----')\n",
      "(0, <re.Match object; span=(1054, 1060), match=b'<5560>'>, b'\\r\\r               \\r00e0-66ff-1b5f   100        Learned          GE1/0/24                 Y\\r\\r\\n2cea-7feb-b118   100        Learned          GE1/0/24                 Y\\r\\r\\n2cea-7fed-051c   100        Learned          GE1/0/24                 Y\\r\\r\\n5254-0018-e279   100        Learned          GE1/0/24                 Y\\r\\r\\n5254-0043-41b8   100        Learned          GE1/0/24                 Y\\r\\r\\n5254-00e7-b127   100        Learned          GE1/0/24                 Y\\r\\r\\n5254-00fb-434e   100        Learned          GE1/0/24                 Y\\r\\r\\n5869-6c01-dd73   100        Learned          GE1/0/24                 Y\\r\\r\\n80fb-06c9-6db9   100        Learned          GE1/0/2                  Y\\r\\r\\n8ca6-dfc4-490d   100        Learned          GE1/0/24                 Y\\r\\r\\nf4b5-2018-50e7   100        Learned          GE1/0/24                 Y\\r\\r\\nf4ee-0823-956a   100        Learned          GE1/0/24                 Y\\r\\r\\n081f-7102-95de   200        Learned          GE1/0/2                  Y\\r\\r\\n80fb-06c9-6db9   200        Learned          GE1/0/2                  Y\\r\\r\\n<5560>')\n",
      "(-1, None, b' ')\n"
     ]
    },
    {
     "data": {
      "text/plain": [
       "[' display mac-address\\r\\r\\nMAC Address      VLAN ID    State            Port/NickName            Aging\\r\\r\\nb83a-080e-f650   2          Learned          GE1/0/9                  Y\\r\\r\\n04f9-f816-6b61   11         Learned          GE1/0/11                 Y\\r\\r\\n3c6a-4852-c1fe   11         Learned          GE1/0/11                 Y\\r\\r\\n4419-b641-7795   11         Learned          GE1/0/3                  Y\\r\\r\\n5254-0033-e4b7   11         Learned          GE1/0/1                  Y\\r\\r\\n5254-00c1-4efa   11         Learned          GE1/0/1                  Y\\r\\r\\n5254-00d4-636c   11         Learned          GE1/0/1                  Y\\r\\r\\n5869-6c01-dd73   11         Learned          GE1/0/1                  Y\\r\\r\\n5cc9-99ea-55e0   11         Learned          GE1/0/11                 Y\\r\\r\\n80fb-06c9-6db9   11         Learned          GE1/0/2                  Y\\r\\r\\n9ca6-15d8-f7a2   11         Learned          GE1/0/1                  Y\\r\\r\\nacb9-2f24-2384   11         Learned          GE1/0/1                  Y\\r\\r\\nb42e-9968-4090   11         Learned          GE1/0/3                  Y\\r\\r\\ne0d5-5efa-1b79   11         Learned          GE1/0/1                  Y\\r\\r\\n020f-ed77-7960   14         Learned          GE1/0/11                 Y\\r\\r\\n80fb-06c9-6db9   14         Learned          GE1/0/2                  Y\\r\\r\\n4ced-fb6c-ef9f   15         Learned          GE1/0/5                  Y\\r\\r\\n7427-eae8-fef9   15         Learned          GE1/0/5                  Y\\r\\r\\n80fb-06c9-6db9   15         Learned          GE1/0/2                  Y\\r\\r\\n8ca6-df43-6b43   15         Learned          GE1/0/5                  Y\\r\\r\\nb42e-999d-1f99   15         Learned          GE1/0/5                  Y\\r\\r\\nb42e-99e6-3c49   15         Learned          GE1/0/5                  Y\\r\\r\\n---- More ----',\n",
       " '\\r\\r               \\r00e0-4c52-032d   17         Learned          GE1/0/7                  Y\\r\\r\\n44a6-42b6-c0a3   17         Learned          GE1/0/7                  Y\\r\\r\\n4cf5-dc97-3421   17         Learned          GE1/0/7                  Y\\r\\r\\n4cf5-dc97-35a9   17         Learned          GE1/0/11                 Y\\r\\r\\n4cf5-dc97-3677   17         Learned          GE1/0/7                  Y\\r\\r\\n4cf5-dc97-3695   17         Learned          GE1/0/11                 Y\\r\\r\\n4cf5-dc97-36b4   17         Learned          GE1/0/7                  Y\\r\\r\\n80fb-06c9-6db9   17         Learned          GE1/0/2                  Y\\r\\r\\n849a-4059-b273   17         Learned          GE1/0/7                  Y\\r\\r\\nacb9-2f46-05f5   17         Learned          GE1/0/7                  Y\\r\\r\\nb42e-9979-de61   17         Learned          GE1/0/7                  Y\\r\\r\\ne0d5-5e56-7edb   17         Learned          GE1/0/7                  Y\\r\\r\\n0020-6bb3-b6d7   20         Learned          GE1/0/9                  Y\\r\\r\\n2428-fdc1-76e4   20         Learned          GE1/0/9                  Y\\r\\r\\n309c-2365-209e   20         Learned          GE1/0/9                  Y\\r\\r\\n3c6a-4838-ecd5   20         Learned          GE1/0/9                  Y\\r\\r\\n408d-5c1d-9e3e   20         Learned          GE1/0/9                  Y\\r\\r\\n4cf5-dc97-3471   20         Learned          GE1/0/9                  Y\\r\\r\\n4cf5-dc9a-c39e   20         Learned          GE1/0/9                  Y\\r\\r\\n807c-62bb-4e1e   20         Learned          GE1/0/9                  Y\\r\\r\\n80fb-06c9-6db9   20         Learned          GE1/0/2                  Y\\r\\r\\n8811-96af-173e   20         Learned          GE1/0/9                  Y\\r\\r\\nb221-0304-e64b   20         Learned          GE1/0/9                  Y\\r\\r\\n---- More ----',\n",
       " '\\r\\r               \\rc85b-7669-9e16   20         Learned          GE1/0/9                  Y\\r\\r\\ne0d5-5ef6-fdd6   20         Learned          GE1/0/9                  Y\\r\\r\\nf46d-2fcf-c3ed   20         Learned          GE1/0/9                  Y\\r\\r\\n0017-6111-f5e7   26         Learned          GE1/0/13                 Y\\r\\r\\n0030-1bba-02db   26         Learned          GE1/0/15                 Y\\r\\r\\n00e0-4c3c-a0db   26         Learned          GE1/0/16                 Y\\r\\r\\n081f-7130-405c   26         Learned          GE1/0/13                 Y\\r\\r\\n0c9d-92cc-8c94   26         Learned          GE1/0/16                 Y\\r\\r\\n1012-fb7a-2656   26         Learned          GE1/0/13                 Y\\r\\r\\n2428-fdc1-7333   26         Learned          GE1/0/13                 Y\\r\\r\\n2428-fdc1-7699   26         Learned          GE1/0/15                 Y\\r\\r\\n2428-fdc1-76c7   26         Learned          GE1/0/13                 Y\\r\\r\\n2428-fdc1-76cc   26         Learned          GE1/0/13                 Y\\r\\r\\n2428-fddc-be9d   26         Learned          GE1/0/13                 Y\\r\\r\\n408d-5ce7-408c   26         Learned          GE1/0/16                 Y\\r\\r\\n4cb0-0810-6c1e   26         Learned          GE1/0/13                 Y\\r\\r\\n4cbd-8f2c-9592   26         Learned          GE1/0/13                 Y\\r\\r\\n4cbd-8f90-6d54   26         Learned          GE1/0/13                 Y\\r\\r\\n4cbd-8fcc-90b6   26         Learned          GE1/0/13                 Y\\r\\r\\n4cbd-8fd5-da71   26         Learned          GE1/0/13                 Y\\r\\r\\n4cf5-dc97-343e   26         Learned          GE1/0/15                 Y\\r\\r\\n4cf5-dc97-344e   26         Learned          GE1/0/15                 Y\\r\\r\\n4cf5-dc97-366e   26         Learned          GE1/0/15                 Y\\r\\r\\n---- More ----',\n",
       " '\\r\\r               \\r5cde-3414-a887   26         Learned          GE1/0/13                 Y\\r\\r\\n6461-4046-fc4d   26         Learned          GE1/0/13                 Y\\r\\r\\n807c-6202-b8a1   26         Learned          GE1/0/13                 Y\\r\\r\\n80fb-06c9-6db9   26         Learned          GE1/0/2                  Y\\r\\r\\na85e-455a-5a7c   26         Learned          GE1/0/16                 Y\\r\\r\\na85e-45a2-e00a   26         Learned          GE1/0/16                 Y\\r\\r\\naccb-51de-42e4   26         Learned          GE1/0/15                 Y\\r\\r\\nb42e-9971-29cd   26         Learned          GE1/0/16                 Y\\r\\r\\nb42e-99ea-043c   26         Learned          GE1/0/15                 Y\\r\\r\\ne062-908d-9995   26         Learned          GE1/0/11                 Y\\r\\r\\ne062-90bb-c9b5   26         Learned          GE1/0/11                 Y\\r\\r\\ne062-90bb-da7a   26         Learned          GE1/0/11                 Y\\r\\r\\nf000-003b-4931   26         Learned          GE1/0/15                 Y\\r\\r\\nf000-003f-669d   26         Learned          GE1/0/15                 Y\\r\\r\\nf000-006c-6648   26         Learned          GE1/0/15                 Y\\r\\r\\nf000-006c-6811   26         Learned          GE1/0/15                 Y\\r\\r\\nf4b5-2024-ef6b   26         Learned          GE1/0/16                 Y\\r\\r\\nfcaa-1470-f02e   26         Learned          GE1/0/16                 Y\\r\\r\\n0017-6111-1ad0   34         Learned          GE1/0/11                 Y\\r\\r\\n0017-6112-279e   34         Learned          GE1/0/11                 Y\\r\\r\\n0017-6112-a93b   34         Learned          GE1/0/11                 Y\\r\\r\\n0017-6112-ab50   34         Learned          GE1/0/11                 Y\\r\\r\\n00d8-610c-3d58   34         Learned          GE1/0/11                 Y\\r\\r\\n---- More ----',\n",
       " '\\r\\r               \\r00e0-0b48-a717   34         Learned          GE1/0/11                 Y\\r\\r\\n00e0-4c85-826d   34         Learned          GE1/0/11                 Y\\r\\r\\n00e0-4cff-2c14   34         Learned          GE1/0/11                 Y\\r\\r\\n00e0-4d95-1326   34         Learned          GE1/0/11                 Y\\r\\r\\n00e0-4f03-2e24   34         Learned          GE1/0/11                 Y\\r\\r\\n00e0-4f03-c582   34         Learned          GE1/0/11                 Y\\r\\r\\n0840-f360-a0d8   34         Learned          GE1/0/11                 Y\\r\\r\\n2428-fdc1-76d0   34         Learned          GE1/0/11                 Y\\r\\r\\n309c-237d-6c73   34         Learned          GE1/0/11                 Y\\r\\r\\n408d-5cfd-e739   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-83af   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-8498   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-8575   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-85b6   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-8609   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-8619   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-86fc   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-86fd   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-8705   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-8706   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-8709   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-870a   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-870f   34         Learned          GE1/0/11                 Y\\r\\r\\n---- More ----',\n",
       " '\\r\\r               \\r4419-b649-8714   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-8716   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-8717   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-8718   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-871c   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-87da   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-87f4   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f2c-9572   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f2c-9597   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f79-1968   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f79-19ac   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f79-19ca   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f79-1b2a   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f79-1b53   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f79-1b76   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f79-1b7a   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f79-1b80   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f79-1b84   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8fba-d012   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8fba-d022   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8fcc-9024   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8fcc-90b8   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8fd3-2aa9   34         Learned          GE1/0/11                 Y\\r\\r\\n---- More ----',\n",
       " '\\r\\r               \\r4cbd-8fd5-da70   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8fd5-da85   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8fd5-dab0   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8fd5-dab2   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8fd5-db1e   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8fd5-dbd4   34         Learned          GE1/0/11                 Y\\r\\r\\n5475-959c-548b   34         Learned          GE1/0/11                 Y\\r\\r\\n5850-ed6d-2f60   34         Learned          GE1/0/11                 Y\\r\\r\\n5850-ed6d-2f7b   34         Learned          GE1/0/11                 Y\\r\\r\\n5869-6c01-dd73   34         Learned          GE1/0/11                 Y\\r\\r\\n70b5-e874-4644   34         Learned          GE1/0/11                 Y\\r\\r\\n7486-e218-0a99   34         Learned          GE1/0/11                 Y\\r\\r\\n7486-e218-1afe   34         Learned          GE1/0/11                 Y\\r\\r\\n74d4-356d-891e   34         Learned          GE1/0/11                 Y\\r\\r\\n80fb-06c9-6db9   34         Learned          GE1/0/2                  Y\\r\\r\\nb42e-9904-6dda   34         Learned          GE1/0/11                 Y\\r\\r\\nb42e-991d-4210   34         Learned          GE1/0/11                 Y\\r\\r\\nb42e-9968-3f8c   34         Learned          GE1/0/11                 Y\\r\\r\\nb42e-997a-2550   34         Learned          GE1/0/11                 Y\\r\\r\\nb42e-997a-2570   34         Learned          GE1/0/11                 Y\\r\\r\\nb42e-99e6-329b   34         Learned          GE1/0/11                 Y\\r\\r\\nc051-7ea4-099f   34         Learned          GE1/0/11                 Y\\r\\r\\nc06d-ed2c-d964   34         Learned          GE1/0/11                 Y\\r\\r\\n---- More ----',\n",
       " '\\r\\r               \\re062-902f-e906   34         Learned          GE1/0/11                 Y\\r\\r\\ne062-9032-a966   34         Learned          GE1/0/11                 Y\\r\\r\\ne062-9082-2258   34         Learned          GE1/0/11                 Y\\r\\r\\ne062-9087-a15a   34         Learned          GE1/0/11                 Y\\r\\r\\ne062-908a-bdc9   34         Learned          GE1/0/11                 Y\\r\\r\\ne062-90b0-4b6a   34         Learned          GE1/0/11                 Y\\r\\r\\ne062-90c9-1712   34         Learned          GE1/0/11                 Y\\r\\r\\ne062-90dd-0803   34         Learned          GE1/0/11                 Y\\r\\r\\ne062-90eb-0492   34         Learned          GE1/0/11                 Y\\r\\r\\ne062-90f6-66b9   34         Learned          GE1/0/11                 Y\\r\\r\\ne0d5-5e6d-bd23   34         Learned          GE1/0/11                 Y\\r\\r\\ne0d5-5ec3-191d   34         Learned          GE1/0/11                 Y\\r\\r\\ne0d5-5efc-0288   34         Learned          GE1/0/11                 Y\\r\\r\\ne247-1f2c-0f6d   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003a-beab   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003a-beaf   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003a-beb3   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003a-bec0   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003a-bec5   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003a-bee5   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003b-4854   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003b-485d   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003b-487f   34         Learned          GE1/0/11                 Y\\r\\r\\n---- More ----',\n",
       " '\\r\\r               \\rf000-003b-489a   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003b-48a1   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003b-4935   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003b-494a   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003f-589e   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003f-64a8   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-006b-da3e   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-006c-8155   34         Learned          GE1/0/11                 Y\\r\\r\\nf484-8df7-5db7   34         Learned          GE1/0/11                 Y\\r\\r\\nfcaa-1422-a331   34         Learned          GE1/0/11                 Y\\r\\r\\n80fb-06c9-6db9   87         Learned          GE1/0/2                  Y\\r\\r\\n8ce7-486e-bf80   87         Learned          GE1/0/11                 Y\\r\\r\\nf000-003f-58bf   87         Learned          GE1/0/11                 Y\\r\\r\\nf000-003f-669c   87         Learned          GE1/0/11                 Y\\r\\r\\n2428-fdc1-76a4   88         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f2c-957c   88         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f90-7198   88         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f90-719c   88         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f90-71a7   88         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8fd5-da6e   88         Learned          GE1/0/11                 Y\\r\\r\\n686d-bcf6-0e91   88         Learned          GE1/0/11                 Y\\r\\r\\n80fb-06c9-6db9   88         Learned          GE1/0/2                  Y\\r\\r\\n0017-6112-b286   100        Learned          GE1/0/24                 Y\\r\\r\\n---- More ----',\n",
       " '\\r\\r               \\r00e0-66ff-1b5f   100        Learned          GE1/0/24                 Y\\r\\r\\n2cea-7feb-b118   100        Learned          GE1/0/24                 Y\\r\\r\\n2cea-7fed-051c   100        Learned          GE1/0/24                 Y\\r\\r\\n5254-0018-e279   100        Learned          GE1/0/24                 Y\\r\\r\\n5254-0043-41b8   100        Learned          GE1/0/24                 Y\\r\\r\\n5254-00e7-b127   100        Learned          GE1/0/24                 Y\\r\\r\\n5254-00fb-434e   100        Learned          GE1/0/24                 Y\\r\\r\\n5869-6c01-dd73   100        Learned          GE1/0/24                 Y\\r\\r\\n80fb-06c9-6db9   100        Learned          GE1/0/2                  Y\\r\\r\\n8ca6-dfc4-490d   100        Learned          GE1/0/24                 Y\\r\\r\\nf4b5-2018-50e7   100        Learned          GE1/0/24                 Y\\r\\r\\nf4ee-0823-956a   100        Learned          GE1/0/24                 Y\\r\\r\\n081f-7102-95de   200        Learned          GE1/0/2                  Y\\r\\r\\n80fb-06c9-6db9   200        Learned          GE1/0/2                  Y\\r\\r\\n<5560>',\n",
       " ' ']"
      ]
     },
     "execution_count": 88,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "def mac2tab(tn):\n",
    "    \"\"\" 返回交换 arp表\"\"\"\n",
    "    tabLs = []\n",
    "    tn.write(b\" display mac-address\\n\")\n",
    "    while 1 :\n",
    "        outLs = tn.expect([b\"<.+?>\",b\"\\r\\r\\n---- More ----\"],timeout=5) #//[b\"\\r\\r\\n---- More ----\"]\n",
    "        if outLs[0] >= 0:\n",
    "            #还有下一个页\n",
    "            tn.write(b\" \")\n",
    "            tabLs.append(outLs[2].decode('ascii'))\n",
    "            print(outLs)\n",
    "        if outLs[0] < 0:\n",
    "            # 完成读取\n",
    "            print(outLs)\n",
    "            tabLs.append(outLs[2].decode('ascii'))\n",
    "            break\n",
    "    return tabLs\n",
    "tabLs = mac2tab(tn)\n",
    "                      \n",
    "tabLs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 96,
   "id": "b782e9a3",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "11"
      ]
     },
     "execution_count": 96,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(tabLs)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 94,
   "id": "50d2d214",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "' display mac-address\\r\\r\\nMAC Address      VLAN ID    State            Port/NickName            Aging\\r\\r\\nb83a-080e-f650   2          Learned          GE1/0/9                  Y\\r\\r\\n04f9-f816-6b61   11         Learned          GE1/0/11                 Y\\r\\r\\n3c6a-4852-c1fe   11         Learned          GE1/0/11                 Y\\r\\r\\n4419-b641-7795   11         Learned          GE1/0/3                  Y\\r\\r\\n5254-0033-e4b7   11         Learned          GE1/0/1                  Y\\r\\r\\n5254-00c1-4efa   11         Learned          GE1/0/1                  Y\\r\\r\\n5254-00d4-636c   11         Learned          GE1/0/1                  Y\\r\\r\\n5869-6c01-dd73   11         Learned          GE1/0/1                  Y\\r\\r\\n5cc9-99ea-55e0   11         Learned          GE1/0/11                 Y\\r\\r\\n80fb-06c9-6db9   11         Learned          GE1/0/2                  Y\\r\\r\\n9ca6-15d8-f7a2   11         Learned          GE1/0/1                  Y\\r\\r\\nacb9-2f24-2384   11         Learned          GE1/0/1                  Y\\r\\r\\nb42e-9968-4090   11         Learned          GE1/0/3                  Y\\r\\r\\ne0d5-5efa-1b79   11         Learned          GE1/0/1                  Y\\r\\r\\n020f-ed77-7960   14         Learned          GE1/0/11                 Y\\r\\r\\n80fb-06c9-6db9   14         Learned          GE1/0/2                  Y\\r\\r\\n4ced-fb6c-ef9f   15         Learned          GE1/0/5                  Y\\r\\r\\n7427-eae8-fef9   15         Learned          GE1/0/5                  Y\\r\\r\\n80fb-06c9-6db9   15         Learned          GE1/0/2                  Y\\r\\r\\n8ca6-df43-6b43   15         Learned          GE1/0/5                  Y\\r\\r\\nb42e-999d-1f99   15         Learned          GE1/0/5                  Y\\r\\r\\nb42e-99e6-3c49   15         Learned          GE1/0/5                  Y\\r\\r\\n---- More ----\\r\\r               \\r00e0-4c52-032d   17         Learned          GE1/0/7                  Y\\r\\r\\n44a6-42b6-c0a3   17         Learned          GE1/0/7                  Y\\r\\r\\n4cf5-dc97-3421   17         Learned          GE1/0/7                  Y\\r\\r\\n4cf5-dc97-35a9   17         Learned          GE1/0/11                 Y\\r\\r\\n4cf5-dc97-3677   17         Learned          GE1/0/7                  Y\\r\\r\\n4cf5-dc97-3695   17         Learned          GE1/0/11                 Y\\r\\r\\n4cf5-dc97-36b4   17         Learned          GE1/0/7                  Y\\r\\r\\n80fb-06c9-6db9   17         Learned          GE1/0/2                  Y\\r\\r\\n849a-4059-b273   17         Learned          GE1/0/7                  Y\\r\\r\\nacb9-2f46-05f5   17         Learned          GE1/0/7                  Y\\r\\r\\nb42e-9979-de61   17         Learned          GE1/0/7                  Y\\r\\r\\ne0d5-5e56-7edb   17         Learned          GE1/0/7                  Y\\r\\r\\n0020-6bb3-b6d7   20         Learned          GE1/0/9                  Y\\r\\r\\n2428-fdc1-76e4   20         Learned          GE1/0/9                  Y\\r\\r\\n309c-2365-209e   20         Learned          GE1/0/9                  Y\\r\\r\\n3c6a-4838-ecd5   20         Learned          GE1/0/9                  Y\\r\\r\\n408d-5c1d-9e3e   20         Learned          GE1/0/9                  Y\\r\\r\\n4cf5-dc97-3471   20         Learned          GE1/0/9                  Y\\r\\r\\n4cf5-dc9a-c39e   20         Learned          GE1/0/9                  Y\\r\\r\\n807c-62bb-4e1e   20         Learned          GE1/0/9                  Y\\r\\r\\n80fb-06c9-6db9   20         Learned          GE1/0/2                  Y\\r\\r\\n8811-96af-173e   20         Learned          GE1/0/9                  Y\\r\\r\\nb221-0304-e64b   20         Learned          GE1/0/9                  Y\\r\\r\\n---- More ----\\r\\r               \\rc85b-7669-9e16   20         Learned          GE1/0/9                  Y\\r\\r\\ne0d5-5ef6-fdd6   20         Learned          GE1/0/9                  Y\\r\\r\\nf46d-2fcf-c3ed   20         Learned          GE1/0/9                  Y\\r\\r\\n0017-6111-f5e7   26         Learned          GE1/0/13                 Y\\r\\r\\n0030-1bba-02db   26         Learned          GE1/0/15                 Y\\r\\r\\n00e0-4c3c-a0db   26         Learned          GE1/0/16                 Y\\r\\r\\n081f-7130-405c   26         Learned          GE1/0/13                 Y\\r\\r\\n0c9d-92cc-8c94   26         Learned          GE1/0/16                 Y\\r\\r\\n1012-fb7a-2656   26         Learned          GE1/0/13                 Y\\r\\r\\n2428-fdc1-7333   26         Learned          GE1/0/13                 Y\\r\\r\\n2428-fdc1-7699   26         Learned          GE1/0/15                 Y\\r\\r\\n2428-fdc1-76c7   26         Learned          GE1/0/13                 Y\\r\\r\\n2428-fdc1-76cc   26         Learned          GE1/0/13                 Y\\r\\r\\n2428-fddc-be9d   26         Learned          GE1/0/13                 Y\\r\\r\\n408d-5ce7-408c   26         Learned          GE1/0/16                 Y\\r\\r\\n4cb0-0810-6c1e   26         Learned          GE1/0/13                 Y\\r\\r\\n4cbd-8f2c-9592   26         Learned          GE1/0/13                 Y\\r\\r\\n4cbd-8f90-6d54   26         Learned          GE1/0/13                 Y\\r\\r\\n4cbd-8fcc-90b6   26         Learned          GE1/0/13                 Y\\r\\r\\n4cbd-8fd5-da71   26         Learned          GE1/0/13                 Y\\r\\r\\n4cf5-dc97-343e   26         Learned          GE1/0/15                 Y\\r\\r\\n4cf5-dc97-344e   26         Learned          GE1/0/15                 Y\\r\\r\\n4cf5-dc97-366e   26         Learned          GE1/0/15                 Y\\r\\r\\n---- More ----\\r\\r               \\r5cde-3414-a887   26         Learned          GE1/0/13                 Y\\r\\r\\n6461-4046-fc4d   26         Learned          GE1/0/13                 Y\\r\\r\\n807c-6202-b8a1   26         Learned          GE1/0/13                 Y\\r\\r\\n80fb-06c9-6db9   26         Learned          GE1/0/2                  Y\\r\\r\\na85e-455a-5a7c   26         Learned          GE1/0/16                 Y\\r\\r\\na85e-45a2-e00a   26         Learned          GE1/0/16                 Y\\r\\r\\naccb-51de-42e4   26         Learned          GE1/0/15                 Y\\r\\r\\nb42e-9971-29cd   26         Learned          GE1/0/16                 Y\\r\\r\\nb42e-99ea-043c   26         Learned          GE1/0/15                 Y\\r\\r\\ne062-908d-9995   26         Learned          GE1/0/11                 Y\\r\\r\\ne062-90bb-c9b5   26         Learned          GE1/0/11                 Y\\r\\r\\ne062-90bb-da7a   26         Learned          GE1/0/11                 Y\\r\\r\\nf000-003b-4931   26         Learned          GE1/0/15                 Y\\r\\r\\nf000-003f-669d   26         Learned          GE1/0/15                 Y\\r\\r\\nf000-006c-6648   26         Learned          GE1/0/15                 Y\\r\\r\\nf000-006c-6811   26         Learned          GE1/0/15                 Y\\r\\r\\nf4b5-2024-ef6b   26         Learned          GE1/0/16                 Y\\r\\r\\nfcaa-1470-f02e   26         Learned          GE1/0/16                 Y\\r\\r\\n0017-6111-1ad0   34         Learned          GE1/0/11                 Y\\r\\r\\n0017-6112-279e   34         Learned          GE1/0/11                 Y\\r\\r\\n0017-6112-a93b   34         Learned          GE1/0/11                 Y\\r\\r\\n0017-6112-ab50   34         Learned          GE1/0/11                 Y\\r\\r\\n00d8-610c-3d58   34         Learned          GE1/0/11                 Y\\r\\r\\n---- More ----\\r\\r               \\r00e0-0b48-a717   34         Learned          GE1/0/11                 Y\\r\\r\\n00e0-4c85-826d   34         Learned          GE1/0/11                 Y\\r\\r\\n00e0-4cff-2c14   34         Learned          GE1/0/11                 Y\\r\\r\\n00e0-4d95-1326   34         Learned          GE1/0/11                 Y\\r\\r\\n00e0-4f03-2e24   34         Learned          GE1/0/11                 Y\\r\\r\\n00e0-4f03-c582   34         Learned          GE1/0/11                 Y\\r\\r\\n0840-f360-a0d8   34         Learned          GE1/0/11                 Y\\r\\r\\n2428-fdc1-76d0   34         Learned          GE1/0/11                 Y\\r\\r\\n309c-237d-6c73   34         Learned          GE1/0/11                 Y\\r\\r\\n408d-5cfd-e739   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-83af   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-8498   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-8575   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-85b6   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-8609   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-8619   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-86fc   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-86fd   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-8705   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-8706   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-8709   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-870a   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-870f   34         Learned          GE1/0/11                 Y\\r\\r\\n---- More ----\\r\\r               \\r4419-b649-8714   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-8716   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-8717   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-8718   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-871c   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-87da   34         Learned          GE1/0/11                 Y\\r\\r\\n4419-b649-87f4   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f2c-9572   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f2c-9597   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f79-1968   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f79-19ac   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f79-19ca   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f79-1b2a   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f79-1b53   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f79-1b76   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f79-1b7a   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f79-1b80   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f79-1b84   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8fba-d012   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8fba-d022   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8fcc-9024   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8fcc-90b8   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8fd3-2aa9   34         Learned          GE1/0/11                 Y\\r\\r\\n---- More ----\\r\\r               \\r4cbd-8fd5-da70   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8fd5-da85   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8fd5-dab0   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8fd5-dab2   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8fd5-db1e   34         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8fd5-dbd4   34         Learned          GE1/0/11                 Y\\r\\r\\n5475-959c-548b   34         Learned          GE1/0/11                 Y\\r\\r\\n5850-ed6d-2f60   34         Learned          GE1/0/11                 Y\\r\\r\\n5850-ed6d-2f7b   34         Learned          GE1/0/11                 Y\\r\\r\\n5869-6c01-dd73   34         Learned          GE1/0/11                 Y\\r\\r\\n70b5-e874-4644   34         Learned          GE1/0/11                 Y\\r\\r\\n7486-e218-0a99   34         Learned          GE1/0/11                 Y\\r\\r\\n7486-e218-1afe   34         Learned          GE1/0/11                 Y\\r\\r\\n74d4-356d-891e   34         Learned          GE1/0/11                 Y\\r\\r\\n80fb-06c9-6db9   34         Learned          GE1/0/2                  Y\\r\\r\\nb42e-9904-6dda   34         Learned          GE1/0/11                 Y\\r\\r\\nb42e-991d-4210   34         Learned          GE1/0/11                 Y\\r\\r\\nb42e-9968-3f8c   34         Learned          GE1/0/11                 Y\\r\\r\\nb42e-997a-2550   34         Learned          GE1/0/11                 Y\\r\\r\\nb42e-997a-2570   34         Learned          GE1/0/11                 Y\\r\\r\\nb42e-99e6-329b   34         Learned          GE1/0/11                 Y\\r\\r\\nc051-7ea4-099f   34         Learned          GE1/0/11                 Y\\r\\r\\nc06d-ed2c-d964   34         Learned          GE1/0/11                 Y\\r\\r\\n---- More ----\\r\\r               \\re062-902f-e906   34         Learned          GE1/0/11                 Y\\r\\r\\ne062-9032-a966   34         Learned          GE1/0/11                 Y\\r\\r\\ne062-9082-2258   34         Learned          GE1/0/11                 Y\\r\\r\\ne062-9087-a15a   34         Learned          GE1/0/11                 Y\\r\\r\\ne062-908a-bdc9   34         Learned          GE1/0/11                 Y\\r\\r\\ne062-90b0-4b6a   34         Learned          GE1/0/11                 Y\\r\\r\\ne062-90c9-1712   34         Learned          GE1/0/11                 Y\\r\\r\\ne062-90dd-0803   34         Learned          GE1/0/11                 Y\\r\\r\\ne062-90eb-0492   34         Learned          GE1/0/11                 Y\\r\\r\\ne062-90f6-66b9   34         Learned          GE1/0/11                 Y\\r\\r\\ne0d5-5e6d-bd23   34         Learned          GE1/0/11                 Y\\r\\r\\ne0d5-5ec3-191d   34         Learned          GE1/0/11                 Y\\r\\r\\ne0d5-5efc-0288   34         Learned          GE1/0/11                 Y\\r\\r\\ne247-1f2c-0f6d   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003a-beab   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003a-beaf   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003a-beb3   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003a-bec0   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003a-bec5   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003a-bee5   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003b-4854   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003b-485d   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003b-487f   34         Learned          GE1/0/11                 Y\\r\\r\\n---- More ----\\r\\r               \\rf000-003b-489a   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003b-48a1   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003b-4935   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003b-494a   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003f-589e   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-003f-64a8   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-006b-da3e   34         Learned          GE1/0/11                 Y\\r\\r\\nf000-006c-8155   34         Learned          GE1/0/11                 Y\\r\\r\\nf484-8df7-5db7   34         Learned          GE1/0/11                 Y\\r\\r\\nfcaa-1422-a331   34         Learned          GE1/0/11                 Y\\r\\r\\n80fb-06c9-6db9   87         Learned          GE1/0/2                  Y\\r\\r\\n8ce7-486e-bf80   87         Learned          GE1/0/11                 Y\\r\\r\\nf000-003f-58bf   87         Learned          GE1/0/11                 Y\\r\\r\\nf000-003f-669c   87         Learned          GE1/0/11                 Y\\r\\r\\n2428-fdc1-76a4   88         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f2c-957c   88         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f90-7198   88         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f90-719c   88         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8f90-71a7   88         Learned          GE1/0/11                 Y\\r\\r\\n4cbd-8fd5-da6e   88         Learned          GE1/0/11                 Y\\r\\r\\n686d-bcf6-0e91   88         Learned          GE1/0/11                 Y\\r\\r\\n80fb-06c9-6db9   88         Learned          GE1/0/2                  Y\\r\\r\\n0017-6112-b286   100        Learned          GE1/0/24                 Y\\r\\r\\n---- More ----\\r\\r               \\r00e0-66ff-1b5f   100        Learned          GE1/0/24                 Y\\r\\r\\n2cea-7feb-b118   100        Learned          GE1/0/24                 Y\\r\\r\\n2cea-7fed-051c   100        Learned          GE1/0/24                 Y\\r\\r\\n5254-0018-e279   100        Learned          GE1/0/24                 Y\\r\\r\\n5254-0043-41b8   100        Learned          GE1/0/24                 Y\\r\\r\\n5254-00e7-b127   100        Learned          GE1/0/24                 Y\\r\\r\\n5254-00fb-434e   100        Learned          GE1/0/24                 Y\\r\\r\\n5869-6c01-dd73   100        Learned          GE1/0/24                 Y\\r\\r\\n80fb-06c9-6db9   100        Learned          GE1/0/2                  Y\\r\\r\\n8ca6-dfc4-490d   100        Learned          GE1/0/24                 Y\\r\\r\\nf4b5-2018-50e7   100        Learned          GE1/0/24                 Y\\r\\r\\nf4ee-0823-956a   100        Learned          GE1/0/24                 Y\\r\\r\\n081f-7102-95de   200        Learned          GE1/0/2                  Y\\r\\r\\n80fb-06c9-6db9   200        Learned          GE1/0/2                  Y\\r\\r\\n<5560> '"
      ]
     },
     "execution_count": 94,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "tabStr = ''.join(tabLs)\n",
    "tabStr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 98,
   "id": "b60bf267",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      " display mac-address\r\n",
      "MAC Address      VLAN ID    State            Port/NickName            Aging\r\n",
      "b83a-080e-f650   2          Learned          GE1/0/9                  Y\r\n",
      "04f9-f816-6b61   11         Learned          GE1/0/11                 Y\r\n",
      "3c6a-4852-c1fe   11         Learned          GE1/0/11                 Y\r\n",
      "4419-b641-7795   11         Learned          GE1/0/3                  Y\r\n",
      "5254-0033-e4b7   11         Learned          GE1/0/1                  Y\r\n",
      "5254-00c1-4efa   11         Learned          GE1/0/1                  Y\r\n",
      "5254-00d4-636c   11         Learned          GE1/0/1                  Y\r\n",
      "5869-6c01-dd73   11         Learned          GE1/0/1                  Y\r\n",
      "5cc9-99ea-55e0   11         Learned          GE1/0/11                 Y\r\n",
      "80fb-06c9-6db9   11         Learned          GE1/0/2                  Y\r\n",
      "9ca6-15d8-f7a2   11         Learned          GE1/0/1                  Y\r\n",
      "acb9-2f24-2384   11         Learned          GE1/0/1                  Y\r\n",
      "b42e-9968-4090   11         Learned          GE1/0/3                  Y\r\n",
      "e0d5-5efa-1b79   11         Learned          GE1/0/1                  Y\r\n",
      "020f-ed77-7960   14         Learned          GE1/0/11                 Y\r\n",
      "80fb-06c9-6db9   14         Learned          GE1/0/2                  Y\r\n",
      "4ced-fb6c-ef9f   15         Learned          GE1/0/5                  Y\r\n",
      "7427-eae8-fef9   15         Learned          GE1/0/5                  Y\r\n",
      "80fb-06c9-6db9   15         Learned          GE1/0/2                  Y\r\n",
      "8ca6-df43-6b43   15         Learned          GE1/0/5                  Y\r\n",
      "b42e-999d-1f99   15         Learned          GE1/0/5                  Y\r\n",
      "b42e-99e6-3c49   15         Learned          GE1/0/5                  Y\r\n",
      "00e0-4c52-032d   17         Learned          GE1/0/7                  Y\r\n",
      "44a6-42b6-c0a3   17         Learned          GE1/0/7                  Y\r\n",
      "4cf5-dc97-3421   17         Learned          GE1/0/7                  Y\r\n",
      "4cf5-dc97-35a9   17         Learned          GE1/0/11                 Y\r\n",
      "4cf5-dc97-3677   17         Learned          GE1/0/7                  Y\r\n",
      "4cf5-dc97-3695   17         Learned          GE1/0/11                 Y\r\n",
      "4cf5-dc97-36b4   17         Learned          GE1/0/7                  Y\r\n",
      "80fb-06c9-6db9   17         Learned          GE1/0/2                  Y\r\n",
      "849a-4059-b273   17         Learned          GE1/0/7                  Y\r\n",
      "acb9-2f46-05f5   17         Learned          GE1/0/7                  Y\r\n",
      "b42e-9979-de61   17         Learned          GE1/0/7                  Y\r\n",
      "e0d5-5e56-7edb   17         Learned          GE1/0/7                  Y\r\n",
      "0020-6bb3-b6d7   20         Learned          GE1/0/9                  Y\r\n",
      "2428-fdc1-76e4   20         Learned          GE1/0/9                  Y\r\n",
      "309c-2365-209e   20         Learned          GE1/0/9                  Y\r\n",
      "3c6a-4838-ecd5   20         Learned          GE1/0/9                  Y\r\n",
      "408d-5c1d-9e3e   20         Learned          GE1/0/9                  Y\r\n",
      "4cf5-dc97-3471   20         Learned          GE1/0/9                  Y\r\n",
      "4cf5-dc9a-c39e   20         Learned          GE1/0/9                  Y\r\n",
      "807c-62bb-4e1e   20         Learned          GE1/0/9                  Y\r\n",
      "80fb-06c9-6db9   20         Learned          GE1/0/2                  Y\r\n",
      "8811-96af-173e   20         Learned          GE1/0/9                  Y\r\n",
      "b221-0304-e64b   20         Learned          GE1/0/9                  Y\r\n",
      "c85b-7669-9e16   20         Learned          GE1/0/9                  Y\r\n",
      "e0d5-5ef6-fdd6   20         Learned          GE1/0/9                  Y\r\n",
      "f46d-2fcf-c3ed   20         Learned          GE1/0/9                  Y\r\n",
      "0017-6111-f5e7   26         Learned          GE1/0/13                 Y\r\n",
      "0030-1bba-02db   26         Learned          GE1/0/15                 Y\r\n",
      "00e0-4c3c-a0db   26         Learned          GE1/0/16                 Y\r\n",
      "081f-7130-405c   26         Learned          GE1/0/13                 Y\r\n",
      "0c9d-92cc-8c94   26         Learned          GE1/0/16                 Y\r\n",
      "1012-fb7a-2656   26         Learned          GE1/0/13                 Y\r\n",
      "2428-fdc1-7333   26         Learned          GE1/0/13                 Y\r\n",
      "2428-fdc1-7699   26         Learned          GE1/0/15                 Y\r\n",
      "2428-fdc1-76c7   26         Learned          GE1/0/13                 Y\r\n",
      "2428-fdc1-76cc   26         Learned          GE1/0/13                 Y\r\n",
      "2428-fddc-be9d   26         Learned          GE1/0/13                 Y\r\n",
      "408d-5ce7-408c   26         Learned          GE1/0/16                 Y\r\n",
      "4cb0-0810-6c1e   26         Learned          GE1/0/13                 Y\r\n",
      "4cbd-8f2c-9592   26         Learned          GE1/0/13                 Y\r\n",
      "4cbd-8f90-6d54   26         Learned          GE1/0/13                 Y\r\n",
      "4cbd-8fcc-90b6   26         Learned          GE1/0/13                 Y\r\n",
      "4cbd-8fd5-da71   26         Learned          GE1/0/13                 Y\r\n",
      "4cf5-dc97-343e   26         Learned          GE1/0/15                 Y\r\n",
      "4cf5-dc97-344e   26         Learned          GE1/0/15                 Y\r\n",
      "4cf5-dc97-366e   26         Learned          GE1/0/15                 Y\r\n",
      "5cde-3414-a887   26         Learned          GE1/0/13                 Y\r\n",
      "6461-4046-fc4d   26         Learned          GE1/0/13                 Y\r\n",
      "807c-6202-b8a1   26         Learned          GE1/0/13                 Y\r\n",
      "80fb-06c9-6db9   26         Learned          GE1/0/2                  Y\r\n",
      "a85e-455a-5a7c   26         Learned          GE1/0/16                 Y\r\n",
      "a85e-45a2-e00a   26         Learned          GE1/0/16                 Y\r\n",
      "accb-51de-42e4   26         Learned          GE1/0/15                 Y\r\n",
      "b42e-9971-29cd   26         Learned          GE1/0/16                 Y\r\n",
      "b42e-99ea-043c   26         Learned          GE1/0/15                 Y\r\n",
      "e062-908d-9995   26         Learned          GE1/0/11                 Y\r\n",
      "e062-90bb-c9b5   26         Learned          GE1/0/11                 Y\r\n",
      "e062-90bb-da7a   26         Learned          GE1/0/11                 Y\r\n",
      "f000-003b-4931   26         Learned          GE1/0/15                 Y\r\n",
      "f000-003f-669d   26         Learned          GE1/0/15                 Y\r\n",
      "f000-006c-6648   26         Learned          GE1/0/15                 Y\r\n",
      "f000-006c-6811   26         Learned          GE1/0/15                 Y\r\n",
      "f4b5-2024-ef6b   26         Learned          GE1/0/16                 Y\r\n",
      "fcaa-1470-f02e   26         Learned          GE1/0/16                 Y\r\n",
      "0017-6111-1ad0   34         Learned          GE1/0/11                 Y\r\n",
      "0017-6112-279e   34         Learned          GE1/0/11                 Y\r\n",
      "0017-6112-a93b   34         Learned          GE1/0/11                 Y\r\n",
      "0017-6112-ab50   34         Learned          GE1/0/11                 Y\r\n",
      "00d8-610c-3d58   34         Learned          GE1/0/11                 Y\r\n",
      "00e0-0b48-a717   34         Learned          GE1/0/11                 Y\r\n",
      "00e0-4c85-826d   34         Learned          GE1/0/11                 Y\r\n",
      "00e0-4cff-2c14   34         Learned          GE1/0/11                 Y\r\n",
      "00e0-4d95-1326   34         Learned          GE1/0/11                 Y\r\n",
      "00e0-4f03-2e24   34         Learned          GE1/0/11                 Y\r\n",
      "00e0-4f03-c582   34         Learned          GE1/0/11                 Y\r\n",
      "0840-f360-a0d8   34         Learned          GE1/0/11                 Y\r\n",
      "2428-fdc1-76d0   34         Learned          GE1/0/11                 Y\r\n",
      "309c-237d-6c73   34         Learned          GE1/0/11                 Y\r\n",
      "408d-5cfd-e739   34         Learned          GE1/0/11                 Y\r\n",
      "4419-b649-83af   34         Learned          GE1/0/11                 Y\r\n",
      "4419-b649-8498   34         Learned          GE1/0/11                 Y\r\n",
      "4419-b649-8575   34         Learned          GE1/0/11                 Y\r\n",
      "4419-b649-85b6   34         Learned          GE1/0/11                 Y\r\n",
      "4419-b649-8609   34         Learned          GE1/0/11                 Y\r\n",
      "4419-b649-8619   34         Learned          GE1/0/11                 Y\r\n",
      "4419-b649-86fc   34         Learned          GE1/0/11                 Y\r\n",
      "4419-b649-86fd   34         Learned          GE1/0/11                 Y\r\n",
      "4419-b649-8705   34         Learned          GE1/0/11                 Y\r\n",
      "4419-b649-8706   34         Learned          GE1/0/11                 Y\r\n",
      "4419-b649-8709   34         Learned          GE1/0/11                 Y\r\n",
      "4419-b649-870a   34         Learned          GE1/0/11                 Y\r\n",
      "4419-b649-870f   34         Learned          GE1/0/11                 Y\r\n",
      "4419-b649-8714   34         Learned          GE1/0/11                 Y\r\n",
      "4419-b649-8716   34         Learned          GE1/0/11                 Y\r\n",
      "4419-b649-8717   34         Learned          GE1/0/11                 Y\r\n",
      "4419-b649-8718   34         Learned          GE1/0/11                 Y\r\n",
      "4419-b649-871c   34         Learned          GE1/0/11                 Y\r\n",
      "4419-b649-87da   34         Learned          GE1/0/11                 Y\r\n",
      "4419-b649-87f4   34         Learned          GE1/0/11                 Y\r\n",
      "4cbd-8f2c-9572   34         Learned          GE1/0/11                 Y\r\n",
      "4cbd-8f2c-9597   34         Learned          GE1/0/11                 Y\r\n",
      "4cbd-8f79-1968   34         Learned          GE1/0/11                 Y\r\n",
      "4cbd-8f79-19ac   34         Learned          GE1/0/11                 Y\r\n",
      "4cbd-8f79-19ca   34         Learned          GE1/0/11                 Y\r\n",
      "4cbd-8f79-1b2a   34         Learned          GE1/0/11                 Y\r\n",
      "4cbd-8f79-1b53   34         Learned          GE1/0/11                 Y\r\n",
      "4cbd-8f79-1b76   34         Learned          GE1/0/11                 Y\r\n",
      "4cbd-8f79-1b7a   34         Learned          GE1/0/11                 Y\r\n",
      "4cbd-8f79-1b80   34         Learned          GE1/0/11                 Y\r\n",
      "4cbd-8f79-1b84   34         Learned          GE1/0/11                 Y\r\n",
      "4cbd-8fba-d012   34         Learned          GE1/0/11                 Y\r\n",
      "4cbd-8fba-d022   34         Learned          GE1/0/11                 Y\r\n",
      "4cbd-8fcc-9024   34         Learned          GE1/0/11                 Y\r\n",
      "4cbd-8fcc-90b8   34         Learned          GE1/0/11                 Y\r\n",
      "4cbd-8fd3-2aa9   34         Learned          GE1/0/11                 Y\r\n",
      "4cbd-8fd5-da70   34         Learned          GE1/0/11                 Y\r\n",
      "4cbd-8fd5-da85   34         Learned          GE1/0/11                 Y\r\n",
      "4cbd-8fd5-dab0   34         Learned          GE1/0/11                 Y\r\n",
      "4cbd-8fd5-dab2   34         Learned          GE1/0/11                 Y\r\n",
      "4cbd-8fd5-db1e   34         Learned          GE1/0/11                 Y\r\n",
      "4cbd-8fd5-dbd4   34         Learned          GE1/0/11                 Y\r\n",
      "5475-959c-548b   34         Learned          GE1/0/11                 Y\r\n",
      "5850-ed6d-2f60   34         Learned          GE1/0/11                 Y\r\n",
      "5850-ed6d-2f7b   34         Learned          GE1/0/11                 Y\r\n",
      "5869-6c01-dd73   34         Learned          GE1/0/11                 Y\r\n",
      "70b5-e874-4644   34         Learned          GE1/0/11                 Y\r\n",
      "7486-e218-0a99   34         Learned          GE1/0/11                 Y\r\n",
      "7486-e218-1afe   34         Learned          GE1/0/11                 Y\r\n",
      "74d4-356d-891e   34         Learned          GE1/0/11                 Y\r\n",
      "80fb-06c9-6db9   34         Learned          GE1/0/2                  Y\r\n",
      "b42e-9904-6dda   34         Learned          GE1/0/11                 Y\r\n",
      "b42e-991d-4210   34         Learned          GE1/0/11                 Y\r\n",
      "b42e-9968-3f8c   34         Learned          GE1/0/11                 Y\r\n",
      "b42e-997a-2550   34         Learned          GE1/0/11                 Y\r\n",
      "b42e-997a-2570   34         Learned          GE1/0/11                 Y\r\n",
      "b42e-99e6-329b   34         Learned          GE1/0/11                 Y\r\n",
      "c051-7ea4-099f   34         Learned          GE1/0/11                 Y\r\n",
      "c06d-ed2c-d964   34         Learned          GE1/0/11                 Y\r\n",
      "e062-902f-e906   34         Learned          GE1/0/11                 Y\r\n",
      "e062-9032-a966   34         Learned          GE1/0/11                 Y\r\n",
      "e062-9082-2258   34         Learned          GE1/0/11                 Y\r\n",
      "e062-9087-a15a   34         Learned          GE1/0/11                 Y\r\n",
      "e062-908a-bdc9   34         Learned          GE1/0/11                 Y\r\n",
      "e062-90b0-4b6a   34         Learned          GE1/0/11                 Y\r\n",
      "e062-90c9-1712   34         Learned          GE1/0/11                 Y\r\n",
      "e062-90dd-0803   34         Learned          GE1/0/11                 Y\r\n",
      "e062-90eb-0492   34         Learned          GE1/0/11                 Y\r\n",
      "e062-90f6-66b9   34         Learned          GE1/0/11                 Y\r\n",
      "e0d5-5e6d-bd23   34         Learned          GE1/0/11                 Y\r\n",
      "e0d5-5ec3-191d   34         Learned          GE1/0/11                 Y\r\n",
      "e0d5-5efc-0288   34         Learned          GE1/0/11                 Y\r\n",
      "e247-1f2c-0f6d   34         Learned          GE1/0/11                 Y\r\n",
      "f000-003a-beab   34         Learned          GE1/0/11                 Y\r\n",
      "f000-003a-beaf   34         Learned          GE1/0/11                 Y\r\n",
      "f000-003a-beb3   34         Learned          GE1/0/11                 Y\r\n",
      "f000-003a-bec0   34         Learned          GE1/0/11                 Y\r\n",
      "f000-003a-bec5   34         Learned          GE1/0/11                 Y\r\n",
      "f000-003a-bee5   34         Learned          GE1/0/11                 Y\r\n",
      "f000-003b-4854   34         Learned          GE1/0/11                 Y\r\n",
      "f000-003b-485d   34         Learned          GE1/0/11                 Y\r\n",
      "f000-003b-487f   34         Learned          GE1/0/11                 Y\r\n",
      "f000-003b-489a   34         Learned          GE1/0/11                 Y\r\n",
      "f000-003b-48a1   34         Learned          GE1/0/11                 Y\r\n",
      "f000-003b-4935   34         Learned          GE1/0/11                 Y\r\n",
      "f000-003b-494a   34         Learned          GE1/0/11                 Y\r\n",
      "f000-003f-589e   34         Learned          GE1/0/11                 Y\r\n",
      "f000-003f-64a8   34         Learned          GE1/0/11                 Y\r\n",
      "f000-006b-da3e   34         Learned          GE1/0/11                 Y\r\n",
      "f000-006c-8155   34         Learned          GE1/0/11                 Y\r\n",
      "f484-8df7-5db7   34         Learned          GE1/0/11                 Y\r\n",
      "fcaa-1422-a331   34         Learned          GE1/0/11                 Y\r\n",
      "80fb-06c9-6db9   87         Learned          GE1/0/2                  Y\r\n",
      "8ce7-486e-bf80   87         Learned          GE1/0/11                 Y\r\n",
      "f000-003f-58bf   87         Learned          GE1/0/11                 Y\r\n",
      "f000-003f-669c   87         Learned          GE1/0/11                 Y\r\n",
      "2428-fdc1-76a4   88         Learned          GE1/0/11                 Y\r\n",
      "4cbd-8f2c-957c   88         Learned          GE1/0/11                 Y\r\n",
      "4cbd-8f90-7198   88         Learned          GE1/0/11                 Y\r\n",
      "4cbd-8f90-719c   88         Learned          GE1/0/11                 Y\r\n",
      "4cbd-8f90-71a7   88         Learned          GE1/0/11                 Y\r\n",
      "4cbd-8fd5-da6e   88         Learned          GE1/0/11                 Y\r\n",
      "686d-bcf6-0e91   88         Learned          GE1/0/11                 Y\r\n",
      "80fb-06c9-6db9   88         Learned          GE1/0/2                  Y\r\n",
      "0017-6112-b286   100        Learned          GE1/0/24                 Y\r\n",
      "00e0-66ff-1b5f   100        Learned          GE1/0/24                 Y\r\n",
      "2cea-7feb-b118   100        Learned          GE1/0/24                 Y\r\n",
      "2cea-7fed-051c   100        Learned          GE1/0/24                 Y\r\n",
      "5254-0018-e279   100        Learned          GE1/0/24                 Y\r\n",
      "5254-0043-41b8   100        Learned          GE1/0/24                 Y\r\n",
      "5254-00e7-b127   100        Learned          GE1/0/24                 Y\r\n",
      "5254-00fb-434e   100        Learned          GE1/0/24                 Y\r\n",
      "5869-6c01-dd73   100        Learned          GE1/0/24                 Y\r\n",
      "80fb-06c9-6db9   100        Learned          GE1/0/2                  Y\r\n",
      "8ca6-dfc4-490d   100        Learned          GE1/0/24                 Y\r\n",
      "f4b5-2018-50e7   100        Learned          GE1/0/24                 Y\r\n",
      "f4ee-0823-956a   100        Learned          GE1/0/24                 Y\r\n",
      "081f-7102-95de   200        Learned          GE1/0/2                  Y\r\n",
      "80fb-06c9-6db9   200        Learned          GE1/0/2                  Y\r\n",
      "<5560> \n"
     ]
    }
   ],
   "source": [
    "print( list2str(tabLs) ) "
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 234,
   "id": "2403bfd8",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "(-1, None, b' ')"
      ]
     },
     "execution_count": 234,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "                      \n",
    "outs = tn.expect([b\"\\\\x1b\\[0m All\\s+\",b\"\\\\n\\\\r\\\\n\\\\r\\\\r.*?\\\\r\\\\n\\\\r\\\\r\\\\n\\\\r.*?#\"],timeout=5) \n",
    "outs"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 92,
   "id": "92f90adf",
   "metadata": {},
   "outputs": [],
   "source": [
    "def list2str(tabLs): \n",
    "    \"\"\" 多行合并成字符串\"\"\"\n",
    "    tabStr = ''.join(tabLs)\n",
    "    linp = '----\\n\\r\\r'\n",
    "    num = tabStr.find (linp)+len(linp)\n",
    "    tabStr = tabStr[num:]\n",
    "    tabStr =  re.sub(\"\\\\n\\\\r\\\\n\\\\r\\\\rTotal Entries:.*?\\\\r\\\\n\\\\r\\\\r\\\\n\\\\r.*?#\", \"\", tabStr) #尾巴\n",
    "    tabStr =  re.sub(\"\\\\x1b\\[.*2K\\\\r\\\\r\", \"\", tabStr) #翻页字符\n",
    "    tabStr =  re.sub(\"\\\\r\\\\r\", \"\", tabStr) #换行\n",
    "    return tabStr\n",
    "tabStr = list2str(tabLs)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 93,
   "id": "2c5c1b0b",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "ay mac-address\n",
      "MAC Address      VLAN ID    State            Port/NickName            Aging\n",
      "b83a-080e-f650   2          Learned          GE1/0/9                  Y\n",
      "04f9-f816-6b61   11         Learned          GE1/0/11                 Y\n",
      "3c6a-4852-c1fe   11         Learned          GE1/0/11                 Y\n",
      "4419-b641-7795   11         Learned          GE1/0/3                  Y\n",
      "5254-0033-e4b7   11         Learned          GE1/0/1                  Y\n",
      "5254-00c1-4efa   11         Learned          GE1/0/1                  Y\n",
      "5254-00d4-636c   11         Learned          GE1/0/1                  Y\n",
      "5869-6c01-dd73   11         Learned          GE1/0/1                  Y\n",
      "5cc9-99ea-55e0   11         Learned          GE1/0/11                 Y\n",
      "80fb-06c9-6db9   11         Learned          GE1/0/2                  Y\n",
      "9ca6-15d8-f7a2   11         Learned          GE1/0/1                  Y\n",
      "acb9-2f24-2384   11         Learned          GE1/0/1                  Y\n",
      "b42e-9968-4090   11         Learned          GE1/0/3                  Y\n",
      "e0d5-5efa-1b79   11         Learned          GE1/0/1                  Y\n",
      "020f-ed77-7960   14         Learned          GE1/0/11                 Y\n",
      "80fb-06c9-6db9   14         Learned          GE1/0/2                  Y\n",
      "4ced-fb6c-ef9f   15         Learned          GE1/0/5                  Y\n",
      "7427-eae8-fef9   15         Learned          GE1/0/5                  Y\n",
      "80fb-06c9-6db9   15         Learned          GE1/0/2                  Y\n",
      "8ca6-df43-6b43   15         Learned          GE1/0/5                  Y\n",
      "b42e-999d-1f99   15         Learned          GE1/0/5                  Y\n",
      "b42e-99e6-3c49   15         Learned          GE1/0/5                  Y\n",
      "---- More ----               \r",
      "00e0-4c52-032d   17         Learned          GE1/0/7                  Y\n",
      "44a6-42b6-c0a3   17         Learned          GE1/0/7                  Y\n",
      "4cf5-dc97-3421   17         Learned          GE1/0/7                  Y\n",
      "4cf5-dc97-35a9   17         Learned          GE1/0/11                 Y\n",
      "4cf5-dc97-3677   17         Learned          GE1/0/7                  Y\n",
      "4cf5-dc97-3695   17         Learned          GE1/0/11                 Y\n",
      "4cf5-dc97-36b4   17         Learned          GE1/0/7                  Y\n",
      "80fb-06c9-6db9   17         Learned          GE1/0/2                  Y\n",
      "849a-4059-b273   17         Learned          GE1/0/7                  Y\n",
      "acb9-2f46-05f5   17         Learned          GE1/0/7                  Y\n",
      "b42e-9979-de61   17         Learned          GE1/0/7                  Y\n",
      "e0d5-5e56-7edb   17         Learned          GE1/0/7                  Y\n",
      "0020-6bb3-b6d7   20         Learned          GE1/0/9                  Y\n",
      "2428-fdc1-76e4   20         Learned          GE1/0/9                  Y\n",
      "309c-2365-209e   20         Learned          GE1/0/9                  Y\n",
      "3c6a-4838-ecd5   20         Learned          GE1/0/9                  Y\n",
      "408d-5c1d-9e3e   20         Learned          GE1/0/9                  Y\n",
      "4cf5-dc97-3471   20         Learned          GE1/0/9                  Y\n",
      "4cf5-dc9a-c39e   20         Learned          GE1/0/9                  Y\n",
      "807c-62bb-4e1e   20         Learned          GE1/0/9                  Y\n",
      "80fb-06c9-6db9   20         Learned          GE1/0/2                  Y\n",
      "8811-96af-173e   20         Learned          GE1/0/9                  Y\n",
      "b221-0304-e64b   20         Learned          GE1/0/9                  Y\n",
      "---- More ----               \r",
      "c85b-7669-9e16   20         Learned          GE1/0/9                  Y\n",
      "e0d5-5ef6-fdd6   20         Learned          GE1/0/9                  Y\n",
      "f46d-2fcf-c3ed   20         Learned          GE1/0/9                  Y\n",
      "0017-6111-f5e7   26         Learned          GE1/0/13                 Y\n",
      "0030-1bba-02db   26         Learned          GE1/0/15                 Y\n",
      "00e0-4c3c-a0db   26         Learned          GE1/0/16                 Y\n",
      "081f-7130-405c   26         Learned          GE1/0/13                 Y\n",
      "0c9d-92cc-8c94   26         Learned          GE1/0/16                 Y\n",
      "1012-fb7a-2656   26         Learned          GE1/0/13                 Y\n",
      "2428-fdc1-7333   26         Learned          GE1/0/13                 Y\n",
      "2428-fdc1-7699   26         Learned          GE1/0/15                 Y\n",
      "2428-fdc1-76c7   26         Learned          GE1/0/13                 Y\n",
      "2428-fdc1-76cc   26         Learned          GE1/0/13                 Y\n",
      "2428-fddc-be9d   26         Learned          GE1/0/13                 Y\n",
      "408d-5ce7-408c   26         Learned          GE1/0/16                 Y\n",
      "4cb0-0810-6c1e   26         Learned          GE1/0/13                 Y\n",
      "4cbd-8f2c-9592   26         Learned          GE1/0/13                 Y\n",
      "4cbd-8f90-6d54   26         Learned          GE1/0/13                 Y\n",
      "4cbd-8fcc-90b6   26         Learned          GE1/0/13                 Y\n",
      "4cbd-8fd5-da71   26         Learned          GE1/0/13                 Y\n",
      "4cf5-dc97-343e   26         Learned          GE1/0/15                 Y\n",
      "4cf5-dc97-344e   26         Learned          GE1/0/15                 Y\n",
      "4cf5-dc97-366e   26         Learned          GE1/0/15                 Y\n",
      "---- More ----               \r",
      "5cde-3414-a887   26         Learned          GE1/0/13                 Y\n",
      "6461-4046-fc4d   26         Learned          GE1/0/13                 Y\n",
      "807c-6202-b8a1   26         Learned          GE1/0/13                 Y\n",
      "80fb-06c9-6db9   26         Learned          GE1/0/2                  Y\n",
      "a85e-455a-5a7c   26         Learned          GE1/0/16                 Y\n",
      "a85e-45a2-e00a   26         Learned          GE1/0/16                 Y\n",
      "accb-51de-42e4   26         Learned          GE1/0/15                 Y\n",
      "b42e-9971-29cd   26         Learned          GE1/0/16                 Y\n",
      "b42e-99ea-043c   26         Learned          GE1/0/15                 Y\n",
      "e062-908d-9995   26         Learned          GE1/0/11                 Y\n",
      "e062-90bb-c9b5   26         Learned          GE1/0/11                 Y\n",
      "e062-90bb-da7a   26         Learned          GE1/0/11                 Y\n",
      "f000-003b-4931   26         Learned          GE1/0/15                 Y\n",
      "f000-003f-669d   26         Learned          GE1/0/15                 Y\n",
      "f000-006c-6648   26         Learned          GE1/0/15                 Y\n",
      "f000-006c-6811   26         Learned          GE1/0/15                 Y\n",
      "f4b5-2024-ef6b   26         Learned          GE1/0/16                 Y\n",
      "fcaa-1470-f02e   26         Learned          GE1/0/16                 Y\n",
      "0017-6111-1ad0   34         Learned          GE1/0/11                 Y\n",
      "0017-6112-279e   34         Learned          GE1/0/11                 Y\n",
      "0017-6112-a93b   34         Learned          GE1/0/11                 Y\n",
      "0017-6112-ab50   34         Learned          GE1/0/11                 Y\n",
      "00d8-610c-3d58   34         Learned          GE1/0/11                 Y\n",
      "---- More ----               \r",
      "00e0-0b48-a717   34         Learned          GE1/0/11                 Y\n",
      "00e0-4c85-826d   34         Learned          GE1/0/11                 Y\n",
      "00e0-4cff-2c14   34         Learned          GE1/0/11                 Y\n",
      "00e0-4d95-1326   34         Learned          GE1/0/11                 Y\n",
      "00e0-4f03-2e24   34         Learned          GE1/0/11                 Y\n",
      "00e0-4f03-c582   34         Learned          GE1/0/11                 Y\n",
      "0840-f360-a0d8   34         Learned          GE1/0/11                 Y\n",
      "2428-fdc1-76d0   34         Learned          GE1/0/11                 Y\n",
      "309c-237d-6c73   34         Learned          GE1/0/11                 Y\n",
      "408d-5cfd-e739   34         Learned          GE1/0/11                 Y\n",
      "4419-b649-83af   34         Learned          GE1/0/11                 Y\n",
      "4419-b649-8498   34         Learned          GE1/0/11                 Y\n",
      "4419-b649-8575   34         Learned          GE1/0/11                 Y\n",
      "4419-b649-85b6   34         Learned          GE1/0/11                 Y\n",
      "4419-b649-8609   34         Learned          GE1/0/11                 Y\n",
      "4419-b649-8619   34         Learned          GE1/0/11                 Y\n",
      "4419-b649-86fc   34         Learned          GE1/0/11                 Y\n",
      "4419-b649-86fd   34         Learned          GE1/0/11                 Y\n",
      "4419-b649-8705   34         Learned          GE1/0/11                 Y\n",
      "4419-b649-8706   34         Learned          GE1/0/11                 Y\n",
      "4419-b649-8709   34         Learned          GE1/0/11                 Y\n",
      "4419-b649-870a   34         Learned          GE1/0/11                 Y\n",
      "4419-b649-870f   34         Learned          GE1/0/11                 Y\n",
      "---- More ----               \r",
      "4419-b649-8714   34         Learned          GE1/0/11                 Y\n",
      "4419-b649-8716   34         Learned          GE1/0/11                 Y\n",
      "4419-b649-8717   34         Learned          GE1/0/11                 Y\n",
      "4419-b649-8718   34         Learned          GE1/0/11                 Y\n",
      "4419-b649-871c   34         Learned          GE1/0/11                 Y\n",
      "4419-b649-87da   34         Learned          GE1/0/11                 Y\n",
      "4419-b649-87f4   34         Learned          GE1/0/11                 Y\n",
      "4cbd-8f2c-9572   34         Learned          GE1/0/11                 Y\n",
      "4cbd-8f2c-9597   34         Learned          GE1/0/11                 Y\n",
      "4cbd-8f79-1968   34         Learned          GE1/0/11                 Y\n",
      "4cbd-8f79-19ac   34         Learned          GE1/0/11                 Y\n",
      "4cbd-8f79-19ca   34         Learned          GE1/0/11                 Y\n",
      "4cbd-8f79-1b2a   34         Learned          GE1/0/11                 Y\n",
      "4cbd-8f79-1b53   34         Learned          GE1/0/11                 Y\n",
      "4cbd-8f79-1b76   34         Learned          GE1/0/11                 Y\n",
      "4cbd-8f79-1b7a   34         Learned          GE1/0/11                 Y\n",
      "4cbd-8f79-1b80   34         Learned          GE1/0/11                 Y\n",
      "4cbd-8f79-1b84   34         Learned          GE1/0/11                 Y\n",
      "4cbd-8fba-d012   34         Learned          GE1/0/11                 Y\n",
      "4cbd-8fba-d022   34         Learned          GE1/0/11                 Y\n",
      "4cbd-8fcc-9024   34         Learned          GE1/0/11                 Y\n",
      "4cbd-8fcc-90b8   34         Learned          GE1/0/11                 Y\n",
      "4cbd-8fd3-2aa9   34         Learned          GE1/0/11                 Y\n",
      "---- More ----               \r",
      "4cbd-8fd5-da70   34         Learned          GE1/0/11                 Y\n",
      "4cbd-8fd5-da85   34         Learned          GE1/0/11                 Y\n",
      "4cbd-8fd5-dab0   34         Learned          GE1/0/11                 Y\n",
      "4cbd-8fd5-dab2   34         Learned          GE1/0/11                 Y\n",
      "4cbd-8fd5-db1e   34         Learned          GE1/0/11                 Y\n",
      "4cbd-8fd5-dbd4   34         Learned          GE1/0/11                 Y\n",
      "5475-959c-548b   34         Learned          GE1/0/11                 Y\n",
      "5850-ed6d-2f60   34         Learned          GE1/0/11                 Y\n",
      "5850-ed6d-2f7b   34         Learned          GE1/0/11                 Y\n",
      "5869-6c01-dd73   34         Learned          GE1/0/11                 Y\n",
      "70b5-e874-4644   34         Learned          GE1/0/11                 Y\n",
      "7486-e218-0a99   34         Learned          GE1/0/11                 Y\n",
      "7486-e218-1afe   34         Learned          GE1/0/11                 Y\n",
      "74d4-356d-891e   34         Learned          GE1/0/11                 Y\n",
      "80fb-06c9-6db9   34         Learned          GE1/0/2                  Y\n",
      "b42e-9904-6dda   34         Learned          GE1/0/11                 Y\n",
      "b42e-991d-4210   34         Learned          GE1/0/11                 Y\n",
      "b42e-9968-3f8c   34         Learned          GE1/0/11                 Y\n",
      "b42e-997a-2550   34         Learned          GE1/0/11                 Y\n",
      "b42e-997a-2570   34         Learned          GE1/0/11                 Y\n",
      "b42e-99e6-329b   34         Learned          GE1/0/11                 Y\n",
      "c051-7ea4-099f   34         Learned          GE1/0/11                 Y\n",
      "c06d-ed2c-d964   34         Learned          GE1/0/11                 Y\n",
      "---- More ----               \r",
      "e062-902f-e906   34         Learned          GE1/0/11                 Y\n",
      "e062-9032-a966   34         Learned          GE1/0/11                 Y\n",
      "e062-9082-2258   34         Learned          GE1/0/11                 Y\n",
      "e062-9087-a15a   34         Learned          GE1/0/11                 Y\n",
      "e062-908a-bdc9   34         Learned          GE1/0/11                 Y\n",
      "e062-90b0-4b6a   34         Learned          GE1/0/11                 Y\n",
      "e062-90c9-1712   34         Learned          GE1/0/11                 Y\n",
      "e062-90dd-0803   34         Learned          GE1/0/11                 Y\n",
      "e062-90eb-0492   34         Learned          GE1/0/11                 Y\n",
      "e062-90f6-66b9   34         Learned          GE1/0/11                 Y\n",
      "e0d5-5e6d-bd23   34         Learned          GE1/0/11                 Y\n",
      "e0d5-5ec3-191d   34         Learned          GE1/0/11                 Y\n",
      "e0d5-5efc-0288   34         Learned          GE1/0/11                 Y\n",
      "e247-1f2c-0f6d   34         Learned          GE1/0/11                 Y\n",
      "f000-003a-beab   34         Learned          GE1/0/11                 Y\n",
      "f000-003a-beaf   34         Learned          GE1/0/11                 Y\n",
      "f000-003a-beb3   34         Learned          GE1/0/11                 Y\n",
      "f000-003a-bec0   34         Learned          GE1/0/11                 Y\n",
      "f000-003a-bec5   34         Learned          GE1/0/11                 Y\n",
      "f000-003a-bee5   34         Learned          GE1/0/11                 Y\n",
      "f000-003b-4854   34         Learned          GE1/0/11                 Y\n",
      "f000-003b-485d   34         Learned          GE1/0/11                 Y\n",
      "f000-003b-487f   34         Learned          GE1/0/11                 Y\n",
      "---- More ----               \r",
      "f000-003b-489a   34         Learned          GE1/0/11                 Y\n",
      "f000-003b-48a1   34         Learned          GE1/0/11                 Y\n",
      "f000-003b-4935   34         Learned          GE1/0/11                 Y\n",
      "f000-003b-494a   34         Learned          GE1/0/11                 Y\n",
      "f000-003f-589e   34         Learned          GE1/0/11                 Y\n",
      "f000-003f-64a8   34         Learned          GE1/0/11                 Y\n",
      "f000-006b-da3e   34         Learned          GE1/0/11                 Y\n",
      "f000-006c-8155   34         Learned          GE1/0/11                 Y\n",
      "f484-8df7-5db7   34         Learned          GE1/0/11                 Y\n",
      "fcaa-1422-a331   34         Learned          GE1/0/11                 Y\n",
      "80fb-06c9-6db9   87         Learned          GE1/0/2                  Y\n",
      "8ce7-486e-bf80   87         Learned          GE1/0/11                 Y\n",
      "f000-003f-58bf   87         Learned          GE1/0/11                 Y\n",
      "f000-003f-669c   87         Learned          GE1/0/11                 Y\n",
      "2428-fdc1-76a4   88         Learned          GE1/0/11                 Y\n",
      "4cbd-8f2c-957c   88         Learned          GE1/0/11                 Y\n",
      "4cbd-8f90-7198   88         Learned          GE1/0/11                 Y\n",
      "4cbd-8f90-719c   88         Learned          GE1/0/11                 Y\n",
      "4cbd-8f90-71a7   88         Learned          GE1/0/11                 Y\n",
      "4cbd-8fd5-da6e   88         Learned          GE1/0/11                 Y\n",
      "686d-bcf6-0e91   88         Learned          GE1/0/11                 Y\n",
      "80fb-06c9-6db9   88         Learned          GE1/0/2                  Y\n",
      "0017-6112-b286   100        Learned          GE1/0/24                 Y\n",
      "---- More ----               \r",
      "00e0-66ff-1b5f   100        Learned          GE1/0/24                 Y\n",
      "2cea-7feb-b118   100        Learned          GE1/0/24                 Y\n",
      "2cea-7fed-051c   100        Learned          GE1/0/24                 Y\n",
      "5254-0018-e279   100        Learned          GE1/0/24                 Y\n",
      "5254-0043-41b8   100        Learned          GE1/0/24                 Y\n",
      "5254-00e7-b127   100        Learned          GE1/0/24                 Y\n",
      "5254-00fb-434e   100        Learned          GE1/0/24                 Y\n",
      "5869-6c01-dd73   100        Learned          GE1/0/24                 Y\n",
      "80fb-06c9-6db9   100        Learned          GE1/0/2                  Y\n",
      "8ca6-dfc4-490d   100        Learned          GE1/0/24                 Y\n",
      "f4b5-2018-50e7   100        Learned          GE1/0/24                 Y\n",
      "f4ee-0823-956a   100        Learned          GE1/0/24                 Y\n",
      "081f-7102-95de   200        Learned          GE1/0/2                  Y\n",
      "80fb-06c9-6db9   200        Learned          GE1/0/2                  Y\n",
      "<5560> \n"
     ]
    }
   ],
   "source": [
    "print(tabStr)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 379,
   "id": "8a361a2c",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'s: 409\\r\\n\\r\\r\\n\\rRuijie#'"
      ]
     },
     "execution_count": 379,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "z = ''.join(tabLs)\n",
    "z[-19:]"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 382,
   "id": "7893bdfb",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "'   1  0020.6BA3.4D7C     Dynamic     GigabitEthernet 0/1      \\n   1  00D8.610C.3D58     Dynamic     GigabitEthernet 0/1      \\n   1  00E0.0B48.A717     Dynamic     GigabitEthernet 0/1      \\n   1  00E0.4C37.ACE4     Dynamic     GigabitEthernet 0/1      \\n   1  00E0.4C3C.A0DB     Dynamic     GigabitEthernet 0/1      \\n   1  00E0.4C52.032D     Dynamic     GigabitEthernet 0/1      \\n   1  00E0.4C57.9160     Dynamic     GigabitEthernet 0/1      \\n   1  00E0.4C85.826D     Dynamic     GigabitEthernet 0/1      \\n   1  00E0.4CFF.2C14     Dynamic     GigabitEthernet 0/1      \\n   1  00E0.4D95.1326     Dynamic     GigabitEthernet 0/1      \\n   1  00E0.4F03.2E24     Dynamic     GigabitEthernet 0/1      \\n   1  00E0.4F03.C582     Dynamic     GigabitEthernet 0/1      \\n   1  00E0.7070.DE71     Dynamic     GigabitEthernet 0/1      \\n   1  00E0.FC09.BCF9     Dynamic     GigabitEthernet 0/1      \\n   1  0259.E77D.711A     Dynamic     GigabitEthernet 0/1      \\n   1  0800.2740.3822     Dynamic     GigabitEthernet 0/4      \\n   1  0C9D.920F.C668     Dynamic     GigabitEthernet 0/1      \\n   1  1012.FB7A.2656     Dynamic     GigabitEthernet 0/1      \\n   1  18C0.4D1B.C69E     Dynamic     GigabitEthernet 0/1      \\n   1  18C0.4DF8.7658     Dynamic     GigabitEthernet 0/1      \\n   1  2428.FDC1.7333     Dynamic     GigabitEthernet 0/1      \\r\\n\\r   1  2428.FDC1.7698     Dynamic     GigabitEthernet 0/1      \\n   1  2428.FDC1.7699     Dynamic     GigabitEthernet 0/1      \\n   1  2428.FDC1.76A4     Dynamic     GigabitEthernet 0/1      \\n   1  2428.FDC1.76C7     Dynamic     GigabitEthernet 0/1      \\n   1  2428.FDC1.76CC     Dynamic     GigabitEthernet 0/1      \\n   1  2428.FDC1.76D0     Dynamic     GigabitEthernet 0/1      \\n   1  2428.FDC1.76E4     Dynamic     GigabitEthernet 0/1      \\n   1  2428.FDDC.BE9D     Dynamic     GigabitEthernet 0/1      \\n   1  309C.2365.209E     Dynamic     GigabitEthernet 0/1      \\n   1  309C.237D.6C73     Dynamic     GigabitEthernet 0/1      \\n   1  309C.23B9.101A     Dynamic     GigabitEthernet 0/1      \\n   1  408D.5C1D.9E3E     Dynamic     GigabitEthernet 0/1      \\n   1  408D.5C8F.2ACA     Dynamic     GigabitEthernet 0/1      \\n   1  408D.5CE7.408C     Dynamic     GigabitEthernet 0/1      \\n   1  40B0.765F.6E47     Dynamic     GigabitEthernet 0/1      \\n   1  4419.B641.7795     Dynamic     GigabitEthernet 0/4      \\n   1  4419.B649.83AF     Dynamic     GigabitEthernet 0/1      \\n   1  4419.B649.8498     Dynamic     GigabitEthernet 0/1      \\n   1  4419.B649.8575     Dynamic     GigabitEthernet 0/1      \\n   1  4419.B649.85B6     Dynamic     GigabitEthernet 0/1      \\n   1  4419.B649.8609     Dynamic     GigabitEthernet 0/1      \\n   1  4419.B649.8619     Dynamic     GigabitEthernet 0/1      \\n   1  4419.B649.86FC     Dynamic     GigabitEthernet 0/1      \\n   1  4419.B649.86FD     Dynamic     GigabitEthernet 0/1      \\r\\n\\r   1  4419.B649.8705     Dynamic     GigabitEthernet 0/1      \\n   1  4419.B649.8706     Dynamic     GigabitEthernet 0/1      \\n   1  4419.B649.8709     Dynamic     GigabitEthernet 0/1      \\n   1  4419.B649.870A     Dynamic     GigabitEthernet 0/1      \\n   1  4419.B649.870F     Dynamic     GigabitEthernet 0/1      \\n   1  4419.B649.8714     Dynamic     GigabitEthernet 0/1      \\n   1  4419.B649.8716     Dynamic     GigabitEthernet 0/1      \\n   1  4419.B649.8717     Dynamic     GigabitEthernet 0/1      \\n   1  4419.B649.8718     Dynamic     GigabitEthernet 0/1      \\n   1  4419.B649.871C     Dynamic     GigabitEthernet 0/1      \\n   1  4419.B649.87DA     Dynamic     GigabitEthernet 0/1      \\n   1  4419.B649.87F4     Dynamic     GigabitEthernet 0/1      \\n   1  44A6.42B6.C0A3     Dynamic     GigabitEthernet 0/1      \\n   1  4CB0.0810.6C1E     Dynamic     GigabitEthernet 0/1      \\n   1  4CBD.8F2C.9572     Dynamic     GigabitEthernet 0/1      \\n   1  4CBD.8F2C.957C     Dynamic     GigabitEthernet 0/1      \\n   1  4CBD.8F2C.9597     Dynamic     GigabitEthernet 0/1      \\n   1  4CBD.8F79.1968     Dynamic     GigabitEthernet 0/1      \\n   1  4CBD.8F79.19AC     Dynamic     GigabitEthernet 0/1      \\n   1  4CBD.8F79.19CA     Dynamic     GigabitEthernet 0/1      \\n   1  4CBD.8F79.1B2A     Dynamic     GigabitEthernet 0/1      \\n   1  4CBD.8F79.1B53     Dynamic     GigabitEthernet 0/1      \\n   1  4CBD.8F79.1B76     Dynamic     GigabitEthernet 0/1      \\n   1  4CBD.8F79.1B7A     Dynamic     GigabitEthernet 0/1      \\r\\n\\r   1  4CBD.8F79.1B80     Dynamic     GigabitEthernet 0/1      \\n   1  4CBD.8F79.1B84     Dynamic     GigabitEthernet 0/1      \\n   1  4CBD.8F90.6D54     Dynamic     GigabitEthernet 0/1      \\n   1  4CBD.8F90.7198     Dynamic     GigabitEthernet 0/1      \\n   1  4CBD.8F90.719C     Dynamic     GigabitEthernet 0/1      \\n   1  4CBD.8F90.71A7     Dynamic     GigabitEthernet 0/1      \\n   1  4CBD.8FBA.D012     Dynamic     GigabitEthernet 0/1      \\n   1  4CBD.8FBA.D022     Dynamic     GigabitEthernet 0/1      \\n   1  4CBD.8FCC.9024     Dynamic     GigabitEthernet 0/1      \\n   1  4CBD.8FCC.90B6     Dynamic     GigabitEthernet 0/1      \\n   1  4CBD.8FCC.90B8     Dynamic     GigabitEthernet 0/1      \\n   1  4CBD.8FD3.2AA9     Dynamic     GigabitEthernet 0/1      \\n   1  4CBD.8FD5.DA6E     Dynamic     GigabitEthernet 0/1      \\n   1  4CBD.8FD5.DA70     Dynamic     GigabitEthernet 0/1      \\n   1  4CBD.8FD5.DA71     Dynamic     GigabitEthernet 0/1      \\n   1  4CBD.8FD5.DA85     Dynamic     GigabitEthernet 0/1      \\n   1  4CBD.8FD5.DA95     Dynamic     GigabitEthernet 0/1      \\n   1  4CBD.8FD5.DAB0     Dynamic     GigabitEthernet 0/1      \\n   1  4CBD.8FD5.DAB2     Dynamic     GigabitEthernet 0/1      \\n   1  4CBD.8FD5.DB1E     Dynamic     GigabitEthernet 0/1      \\n   1  4CBD.8FD5.DBD4     Dynamic     GigabitEthernet 0/1      \\n   1  4CED.FB41.FB44     Dynamic     GigabitEthernet 0/1      \\n   1  4CED.FB41.FBA5     Dynamic     GigabitEthernet 0/1      \\n   1  4CED.FB6C.EF9F     Dynamic     GigabitEthernet 0/1      \\r\\n\\r   1  4CF5.DC97.3421     Dynamic     GigabitEthernet 0/1      \\n   1  4CF5.DC97.343E     Dynamic     GigabitEthernet 0/1      \\n   1  4CF5.DC97.344E     Dynamic     GigabitEthernet 0/1      \\n   1  4CF5.DC97.3471     Dynamic     GigabitEthernet 0/1      \\n   1  4CF5.DC97.35A9     Dynamic     GigabitEthernet 0/1      \\n   1  4CF5.DC97.366E     Dynamic     GigabitEthernet 0/1      \\n   1  4CF5.DC97.3677     Dynamic     GigabitEthernet 0/1      \\n   1  4CF5.DC97.3695     Dynamic     GigabitEthernet 0/1      \\n   1  4CF5.DC97.36B4     Dynamic     GigabitEthernet 0/1      \\n   1  4CF5.DC9A.C39E     Dynamic     GigabitEthernet 0/1      \\n   1  5475.959C.548B     Dynamic     GigabitEthernet 0/1      \\n   1  5850.ED6D.2F60     Dynamic     GigabitEthernet 0/1      \\n   1  5850.ED6D.2F7B     Dynamic     GigabitEthernet 0/1      \\n   1  5869.6C01.DD72     Static      CPU                      \\n   1  6045.CB7F.C902     Dynamic     GigabitEthernet 0/1      \\n   1  686D.BCF6.0E91     Dynamic     GigabitEthernet 0/1      \\n   1  70B5.E874.56E5     Dynamic     GigabitEthernet 0/1      \\n   1  70B5.E874.5732     Dynamic     GigabitEthernet 0/1      \\n   1  728A.A3BA.DA4F     Dynamic     GigabitEthernet 0/1      \\n   1  7405.A563.FBA3     Dynamic     GigabitEthernet 0/1      \\n   1  7427.EAE8.FEF9     Dynamic     GigabitEthernet 0/1      \\n   1  7486.E218.0A99     Dynamic     GigabitEthernet 0/1      \\n   1  7486.E218.1AFE     Dynamic     GigabitEthernet 0/1      \\n   1  74D4.356D.891E     Dynamic     GigabitEthernet 0/1      \\r\\n\\r   1  807C.6202.B8A1     Dynamic     GigabitEthernet 0/1      \\n   1  807C.62BB.4E1E     Dynamic     GigabitEthernet 0/1      \\n   1  80FB.06C9.6DB9     Dynamic     GigabitEthernet 0/1      \\n   1  8220.C9C9.82B6     Dynamic     GigabitEthernet 0/1      \\n   1  8469.9386.4585     Dynamic     GigabitEthernet 0/1      \\n   1  849A.4059.B273     Dynamic     GigabitEthernet 0/1      \\n   1  8630.12F1.DA35     Dynamic     GigabitEthernet 0/1      \\n   1  8811.96AF.173E     Dynamic     GigabitEthernet 0/1      \\n   1  8CE7.486E.BF80     Dynamic     GigabitEthernet 0/1      \\n   1  A85E.455A.5A7C     Dynamic     GigabitEthernet 0/1      \\n   1  A85E.45A0.0ACE     Dynamic     GigabitEthernet 0/1      \\n   1  A85E.45A0.0B0E     Dynamic     GigabitEthernet 0/1      \\n   1  ACB9.2F24.2384     Dynamic     GigabitEthernet 0/3      \\n   1  ACB9.2F46.05F5     Dynamic     GigabitEthernet 0/1      \\n   1  ACCB.51DE.42E4     Dynamic     GigabitEthernet 0/1      \\n   1  B42E.9904.6DDA     Dynamic     GigabitEthernet 0/1      \\n   1  B42E.991D.4210     Dynamic     GigabitEthernet 0/1      \\n   1  B42E.9944.2E6E     Dynamic     GigabitEthernet 0/1      \\n   1  B42E.9968.3F8C     Dynamic     GigabitEthernet 0/1      \\n   1  B42E.9968.4090     Dynamic     GigabitEthernet 0/4      \\n   1  B42E.9971.29CD     Dynamic     GigabitEthernet 0/1      \\n   1  B42E.9979.DE61     Dynamic     GigabitEthernet 0/1      \\n   1  B42E.997A.2550     Dynamic     GigabitEthernet 0/1      \\n   1  B42E.997A.2570     Dynamic     GigabitEthernet 0/1      \\r\\n\\r   1  B42E.999D.1F99     Dynamic     GigabitEthernet 0/1      \\n   1  B42E.99E6.329B     Dynamic     GigabitEthernet 0/1      \\n   1  B42E.99E6.3C49     Dynamic     GigabitEthernet 0/1      \\n   1  B83A.080E.F650     Dynamic     GigabitEthernet 0/1      \\n   1  C051.7EA4.099F     Dynamic     GigabitEthernet 0/1      \\n   1  C06D.ED2C.D964     Dynamic     GigabitEthernet 0/1      \\n   1  D45D.6439.A7A3     Dynamic     GigabitEthernet 0/1      \\n   1  E062.908D.9995     Dynamic     GigabitEthernet 0/1      \\n   1  E062.90BB.C9B5     Dynamic     GigabitEthernet 0/1      \\n   1  E062.90BB.DA7A     Dynamic     GigabitEthernet 0/1      \\n   1  E0D5.5E51.EA27     Dynamic     GigabitEthernet 0/1      \\n   1  E0D5.5E56.7EDB     Dynamic     GigabitEthernet 0/1      \\n   1  E0D5.5E6D.BD23     Dynamic     GigabitEthernet 0/1      \\n   1  E0D5.5EC3.191D     Dynamic     GigabitEthernet 0/1      \\n   1  E0D5.5ED5.47EE     Dynamic     GigabitEthernet 0/1      \\n   1  E0D5.5EFC.0288     Dynamic     GigabitEthernet 0/1      \\n   1  E0D5.5EFC.0D5F     Dynamic     GigabitEthernet 0/1      \\n   1  E86A.642E.0446     Dynamic     GigabitEthernet 0/1      \\n   1  F000.003A.BEAB     Dynamic     GigabitEthernet 0/1      \\n   1  F000.003A.BEAF     Dynamic     GigabitEthernet 0/1      \\n   1  F000.003A.BEB3     Dynamic     GigabitEthernet 0/1      \\n   1  F000.003A.BEC0     Dynamic     GigabitEthernet 0/1      \\n   1  F000.003A.BEC5     Dynamic     GigabitEthernet 0/1      \\n   1  F000.003B.4854     Dynamic     GigabitEthernet 0/1      \\r\\n\\r   1  F000.003B.485D     Dynamic     GigabitEthernet 0/1      \\n   1  F000.003B.487F     Dynamic     GigabitEthernet 0/1      \\n   1  F000.003B.489A     Dynamic     GigabitEthernet 0/1      \\n   1  F000.003B.48A1     Dynamic     GigabitEthernet 0/1      \\n   1  F000.003B.4935     Dynamic     GigabitEthernet 0/1      \\n   1  F000.003B.494A     Dynamic     GigabitEthernet 0/1      \\n   1  F000.003F.58BF     Dynamic     GigabitEthernet 0/1      \\n   1  F000.003F.669C     Dynamic     GigabitEthernet 0/1      \\n   1  F079.596C.908A     Dynamic     GigabitEthernet 0/1      \\n   1  F4B5.2024.EBAF     Dynamic     GigabitEthernet 0/1      \\n   1  F4B5.2024.EF6B     Dynamic     GigabitEthernet 0/1      \\n   1  F4B5.2024.F19B     Dynamic     GigabitEthernet 0/1      \\n   1  F4B5.2024.F365     Dynamic     GigabitEthernet 0/1      \\n   1  F4B5.2024.F44C     Dynamic     GigabitEthernet 0/1      \\n   1  F4B5.203B.1E44     Dynamic     GigabitEthernet 0/1      \\n   1  F4B5.203B.1EEC     Dynamic     GigabitEthernet 0/1      \\n   1  F4B5.203B.2404     Dynamic     GigabitEthernet 0/1      \\n   1  FCAA.1422.A331     Dynamic     GigabitEthernet 0/1      \\n   1  FCAA.1470.F02E     Dynamic     GigabitEthernet 0/1      \\n  12  0017.6111.1AD0     Dynamic     GigabitEthernet 0/23     \\n  12  0017.6112.279E     Dynamic     GigabitEthernet 0/22     \\n  12  0017.6112.A93B     Dynamic     GigabitEthernet 0/22     \\n  12  0017.6112.AB50     Dynamic     GigabitEthernet 0/22     \\n  12  0020.6BA3.4D7C     Dynamic     GigabitEthernet 0/17     \\r\\n\\r  12  00D8.610C.3D58     Dynamic     GigabitEthernet 0/23     \\n  12  00E0.0B48.A717     Dynamic     GigabitEthernet 0/22     \\n  12  00E0.4C37.ACE4     Dynamic     GigabitEthernet 0/22     \\n  12  00E0.4C3C.A0DB     Dynamic     GigabitEthernet 0/17     \\n  12  00E0.4C52.032D     Dynamic     GigabitEthernet 0/17     \\n  12  00E0.4C57.9160     Dynamic     GigabitEthernet 0/17     \\n  12  00E0.4C85.826D     Dynamic     GigabitEthernet 0/23     \\n  12  00E0.4CFF.2C14     Dynamic     GigabitEthernet 0/22     \\n  12  00E0.4D95.1326     Dynamic     GigabitEthernet 0/19     \\n  12  00E0.4F03.2E24     Dynamic     GigabitEthernet 0/23     \\n  12  00E0.4F03.C582     Dynamic     GigabitEthernet 0/22     \\n  12  00E0.7070.DE71     Dynamic     GigabitEthernet 0/23     \\n  12  00E0.FC09.BCF9     Dynamic     GigabitEthernet 0/17     \\n  12  020F.ED77.7960     Dynamic     GigabitEthernet 0/22     \\n  12  0259.E77D.711A     Dynamic     GigabitEthernet 0/17     \\n  12  0800.2740.3822     Dynamic     GigabitEthernet 0/17     \\n  12  081F.7150.30DE     Dynamic     GigabitEthernet 0/22     \\n  12  0840.F360.A0D8     Dynamic     GigabitEthernet 0/22     \\n  12  0C9D.920F.C668     Dynamic     GigabitEthernet 0/19     \\n  12  1012.FB7A.2656     Dynamic     GigabitEthernet 0/17     \\n  12  18C0.4D1B.C69E     Dynamic     GigabitEthernet 0/17     \\n  12  18C0.4DF8.7658     Dynamic     GigabitEthernet 0/23     \\n  12  2428.FDC1.7333     Dynamic     GigabitEthernet 0/17     \\n  12  2428.FDC1.7698     Dynamic     GigabitEthernet 0/17     \\r\\n\\r  12  2428.FDC1.7699     Dynamic     GigabitEthernet 0/17     \\n  12  2428.FDC1.76A4     Dynamic     GigabitEthernet 0/22     \\n  12  2428.FDC1.76C7     Dynamic     GigabitEthernet 0/17     \\n  12  2428.FDC1.76CC     Dynamic     GigabitEthernet 0/17     \\n  12  2428.FDC1.76D0     Dynamic     GigabitEthernet 0/23     \\n  12  2428.FDC1.76E4     Dynamic     GigabitEthernet 0/17     \\n  12  2428.FDDC.BE9D     Dynamic     GigabitEthernet 0/17     \\n  12  24CF.24A4.2DA8     Dynamic     GigabitEthernet 0/23     \\n  12  309C.2365.209E     Dynamic     GigabitEthernet 0/17     \\n  12  309C.237D.6C73     Dynamic     GigabitEthernet 0/22     \\n  12  309C.23B9.101A     Dynamic     GigabitEthernet 0/17     \\n  12  408D.5C1D.9E3E     Dynamic     GigabitEthernet 0/17     \\n  12  408D.5C8F.2ACA     Dynamic     GigabitEthernet 0/17     \\n  12  408D.5CE7.408C     Dynamic     GigabitEthernet 0/17     \\n  12  40B0.765F.6E47     Dynamic     GigabitEthernet 0/17     \\n  12  4419.B641.7795     Dynamic     GigabitEthernet 0/17     \\n  12  4419.B649.83AF     Dynamic     GigabitEthernet 0/23     \\n  12  4419.B649.8498     Dynamic     GigabitEthernet 0/23     \\n  12  4419.B649.8575     Dynamic     GigabitEthernet 0/23     \\n  12  4419.B649.85B6     Dynamic     GigabitEthernet 0/23     \\n  12  4419.B649.8609     Dynamic     GigabitEthernet 0/23     \\n  12  4419.B649.8619     Dynamic     GigabitEthernet 0/23     \\n  12  4419.B649.86FC     Dynamic     GigabitEthernet 0/23     \\n  12  4419.B649.86FD     Dynamic     GigabitEthernet 0/23     \\r\\n\\r  12  4419.B649.8705     Dynamic     GigabitEthernet 0/23     \\n  12  4419.B649.8706     Dynamic     GigabitEthernet 0/23     \\n  12  4419.B649.8709     Dynamic     GigabitEthernet 0/23     \\n  12  4419.B649.870A     Dynamic     GigabitEthernet 0/23     \\n  12  4419.B649.870F     Dynamic     GigabitEthernet 0/23     \\n  12  4419.B649.8714     Dynamic     GigabitEthernet 0/23     \\n  12  4419.B649.8716     Dynamic     GigabitEthernet 0/23     \\n  12  4419.B649.8717     Dynamic     GigabitEthernet 0/23     \\n  12  4419.B649.8718     Dynamic     GigabitEthernet 0/23     \\n  12  4419.B649.871C     Dynamic     GigabitEthernet 0/23     \\n  12  4419.B649.87DA     Dynamic     GigabitEthernet 0/23     \\n  12  4419.B649.87F4     Dynamic     GigabitEthernet 0/23     \\n  12  44A6.42B6.C0A3     Dynamic     GigabitEthernet 0/17     \\n  12  4CB0.0810.6C1E     Dynamic     GigabitEthernet 0/17     \\n  12  4CBD.8F2C.9572     Dynamic     GigabitEthernet 0/23     \\n  12  4CBD.8F2C.957C     Dynamic     GigabitEthernet 0/23     \\n  12  4CBD.8F2C.9597     Dynamic     GigabitEthernet 0/23     \\n  12  4CBD.8F79.1968     Dynamic     GigabitEthernet 0/22     \\n  12  4CBD.8F79.19AC     Dynamic     GigabitEthernet 0/22     \\n  12  4CBD.8F79.19CA     Dynamic     GigabitEthernet 0/23     \\n  12  4CBD.8F79.1B2A     Dynamic     GigabitEthernet 0/22     \\n  12  4CBD.8F79.1B53     Dynamic     GigabitEthernet 0/22     \\n  12  4CBD.8F79.1B76     Dynamic     GigabitEthernet 0/22     \\n  12  4CBD.8F79.1B7A     Dynamic     GigabitEthernet 0/22     \\r\\n\\r  12  4CBD.8F79.1B80     Dynamic     GigabitEthernet 0/22     \\n  12  4CBD.8F79.1B84     Dynamic     GigabitEthernet 0/22     \\n  12  4CBD.8F90.6D54     Dynamic     GigabitEthernet 0/17     \\n  12  4CBD.8F90.7198     Dynamic     GigabitEthernet 0/23     \\n  12  4CBD.8F90.719C     Dynamic     GigabitEthernet 0/22     \\n  12  4CBD.8F90.71A7     Dynamic     GigabitEthernet 0/22     \\n  12  4CBD.8FBA.D012     Dynamic     GigabitEthernet 0/22     \\n  12  4CBD.8FBA.D022     Dynamic     GigabitEthernet 0/22     \\n  12  4CBD.8FCC.9024     Dynamic     GigabitEthernet 0/23     \\n  12  4CBD.8FCC.90B6     Dynamic     GigabitEthernet 0/17     \\n  12  4CBD.8FCC.90B8     Dynamic     GigabitEthernet 0/23     \\n  12  4CBD.8FD3.2AA9     Dynamic     GigabitEthernet 0/22     \\n  12  4CBD.8FD5.DA6E     Dynamic     GigabitEthernet 0/22     \\n  12  4CBD.8FD5.DA70     Dynamic     GigabitEthernet 0/23     \\n  12  4CBD.8FD5.DA71     Dynamic     GigabitEthernet 0/17     \\n  12  4CBD.8FD5.DA85     Dynamic     GigabitEthernet 0/23     \\n  12  4CBD.8FD5.DA95     Dynamic     GigabitEthernet 0/22     \\n  12  4CBD.8FD5.DAB0     Dynamic     GigabitEthernet 0/22     \\n  12  4CBD.8FD5.DAB2     Dynamic     GigabitEthernet 0/22     \\n  12  4CBD.8FD5.DB1E     Dynamic     GigabitEthernet 0/22     \\n  12  4CBD.8FD5.DBD4     Dynamic     GigabitEthernet 0/22     \\n  12  4CED.FB41.FB44     Dynamic     GigabitEthernet 0/19     \\n  12  4CED.FB41.FBA5     Dynamic     GigabitEthernet 0/17     \\n  12  4CED.FB6C.EF9F     Dynamic     GigabitEthernet 0/17     \\r\\n\\r  12  4CF5.DC97.3421     Dynamic     GigabitEthernet 0/17     \\n  12  4CF5.DC97.343E     Dynamic     GigabitEthernet 0/17     \\n  12  4CF5.DC97.344E     Dynamic     GigabitEthernet 0/17     \\n  12  4CF5.DC97.3471     Dynamic     GigabitEthernet 0/17     \\n  12  4CF5.DC97.35A9     Dynamic     GigabitEthernet 0/23     \\n  12  4CF5.DC97.366E     Dynamic     GigabitEthernet 0/17     \\n  12  4CF5.DC97.3677     Dynamic     GigabitEthernet 0/17     \\n  12  4CF5.DC97.3695     Dynamic     GigabitEthernet 0/23     \\n  12  4CF5.DC97.36B4     Dynamic     GigabitEthernet 0/17     \\n  12  4CF5.DC9A.C39E     Dynamic     GigabitEthernet 0/17     \\n  12  5475.959C.548B     Dynamic     GigabitEthernet 0/23     \\n  12  5850.ED6D.2F60     Dynamic     GigabitEthernet 0/19     \\n  12  5850.ED6D.2F7B     Dynamic     GigabitEthernet 0/19     \\n  12  5CDE.34F7.014D     Dynamic     GigabitEthernet 0/19     \\n  12  6045.CB7F.C902     Dynamic     GigabitEthernet 0/23     \\n  12  686D.BCF6.0E91     Dynamic     GigabitEthernet 0/22     \\n  12  70B5.E874.4644     Dynamic     GigabitEthernet 0/22     \\n  12  70B5.E874.56E5     Dynamic     GigabitEthernet 0/17     \\n  12  70B5.E874.5732     Dynamic     GigabitEthernet 0/17     \\n  12  70B5.E874.5844     Dynamic     GigabitEthernet 0/22     \\n  12  728A.A3BA.DA4F     Dynamic     GigabitEthernet 0/17     \\n  12  7405.A563.FBA3     Dynamic     GigabitEthernet 0/23     \\n  12  7427.EAE8.FEF9     Dynamic     GigabitEthernet 0/17     \\n  12  7486.E218.0A99     Dynamic     GigabitEthernet 0/19     \\r\\n\\r  12  7486.E218.1AFE     Dynamic     GigabitEthernet 0/19     \\n  12  74D4.356D.891E     Dynamic     GigabitEthernet 0/22     \\n  12  807C.6202.B8A1     Dynamic     GigabitEthernet 0/17     \\n  12  807C.62BB.4E1E     Dynamic     GigabitEthernet 0/17     \\n  12  80FB.06C9.6DB9     Dynamic     GigabitEthernet 0/17     \\n  12  8220.C9C9.82B6     Dynamic     GigabitEthernet 0/17     \\n  12  8269.C0E2.CBE1     Dynamic     GigabitEthernet 0/22     \\n  12  8469.9386.4585     Dynamic     GigabitEthernet 0/19     \\n  12  849A.4059.B273     Dynamic     GigabitEthernet 0/17     \\n  12  8630.12F1.DA35     Dynamic     GigabitEthernet 0/17     \\n  12  8811.96AF.173E     Dynamic     GigabitEthernet 0/17     \\n  12  8CE7.486E.BF80     Dynamic     GigabitEthernet 0/23     \\n  12  A85E.455A.5A7C     Dynamic     GigabitEthernet 0/17     \\n  12  A85E.45A0.0ACE     Dynamic     GigabitEthernet 0/17     \\n  12  A85E.45A0.0B0E     Dynamic     GigabitEthernet 0/23     \\n  12  ACB9.2F24.2384     Dynamic     GigabitEthernet 0/17     \\n  12  ACB9.2F46.05F5     Dynamic     GigabitEthernet 0/17     \\n  12  ACCB.51DE.42E4     Dynamic     GigabitEthernet 0/17     \\n  12  B42E.9904.6DDA     Dynamic     GigabitEthernet 0/26     \\n  12  B42E.991D.4210     Dynamic     GigabitEthernet 0/22     \\n  12  B42E.9944.2E6E     Dynamic     GigabitEthernet 0/23     \\n  12  B42E.9968.3F8C     Dynamic     GigabitEthernet 0/23     \\n  12  B42E.9968.4090     Dynamic     GigabitEthernet 0/17     \\n  12  B42E.9971.29CD     Dynamic     GigabitEthernet 0/17     \\r\\n\\r  12  B42E.9979.DE61     Dynamic     GigabitEthernet 0/17     \\n  12  B42E.997A.2550     Dynamic     GigabitEthernet 0/22     \\n  12  B42E.997A.2570     Dynamic     GigabitEthernet 0/22     \\n  12  B42E.999D.1F99     Dynamic     GigabitEthernet 0/17     \\n  12  B42E.99E6.329B     Dynamic     GigabitEthernet 0/22     \\n  12  B42E.99E6.3C49     Dynamic     GigabitEthernet 0/17     \\n  12  B42E.99EA.043C     Dynamic     GigabitEthernet 0/23     \\n  12  B83A.080E.F650     Dynamic     GigabitEthernet 0/17     \\n  12  C051.7EA4.099F     Dynamic     GigabitEthernet 0/23     \\n  12  C06D.ED2C.D964     Dynamic     GigabitEthernet 0/19     \\n  12  D45D.6439.A7A3     Dynamic     GigabitEthernet 0/17     \\n  12  E062.902F.E906     Dynamic     GigabitEthernet 0/22     \\n  12  E062.9032.A966     Dynamic     GigabitEthernet 0/22     \\n  12  E062.9082.2258     Dynamic     GigabitEthernet 0/22     \\n  12  E062.9087.A15A     Dynamic     GigabitEthernet 0/22     \\n  12  E062.908A.BDC9     Dynamic     GigabitEthernet 0/22     \\n  12  E062.908D.9995     Dynamic     GigabitEthernet 0/23     \\n  12  E062.90B0.4B6A     Dynamic     GigabitEthernet 0/22     \\n  12  E062.90BB.C9B5     Dynamic     GigabitEthernet 0/23     \\n  12  E062.90BB.DA7A     Dynamic     GigabitEthernet 0/23     \\n  12  E062.90C9.1712     Dynamic     GigabitEthernet 0/22     \\n  12  E062.90DD.0803     Dynamic     GigabitEthernet 0/22     \\n  12  E062.90EB.0492     Dynamic     GigabitEthernet 0/22     \\n  12  E062.90F6.66B9     Dynamic     GigabitEthernet 0/22     \\r\\n\\r  12  E0D5.5E51.EA27     Dynamic     GigabitEthernet 0/22     \\n  12  E0D5.5E56.7EDB     Dynamic     GigabitEthernet 0/17     \\n  12  E0D5.5E6D.BD23     Dynamic     GigabitEthernet 0/26     \\n  12  E0D5.5EC3.191D     Dynamic     GigabitEthernet 0/22     \\n  12  E0D5.5ED5.47EE     Dynamic     GigabitEthernet 0/19     \\n  12  E0D5.5EFC.0288     Dynamic     GigabitEthernet 0/23     \\n  12  E0D5.5EFC.0D5F     Dynamic     GigabitEthernet 0/17     \\n  12  E247.1F2C.0F6D     Dynamic     GigabitEthernet 0/22     \\n  12  E86A.642E.0446     Dynamic     GigabitEthernet 0/17     \\n  12  F000.003A.BEAB     Dynamic     GigabitEthernet 0/23     \\n  12  F000.003A.BEAF     Dynamic     GigabitEthernet 0/22     \\n  12  F000.003A.BEB3     Dynamic     GigabitEthernet 0/22     \\n  12  F000.003A.BEC0     Dynamic     GigabitEthernet 0/23     \\n  12  F000.003A.BEC5     Dynamic     GigabitEthernet 0/22     \\n  12  F000.003A.BEE5     Dynamic     GigabitEthernet 0/22     \\n  12  F000.003B.4854     Dynamic     GigabitEthernet 0/23     \\n  12  F000.003B.485D     Dynamic     GigabitEthernet 0/22     \\n  12  F000.003B.487F     Dynamic     GigabitEthernet 0/22     \\n  12  F000.003B.489A     Dynamic     GigabitEthernet 0/22     \\n  12  F000.003B.48A1     Dynamic     GigabitEthernet 0/22     \\n  12  F000.003B.4935     Dynamic     GigabitEthernet 0/22     \\n  12  F000.003B.494A     Dynamic     GigabitEthernet 0/22     \\n  12  F000.003F.589E     Dynamic     GigabitEthernet 0/23     \\n  12  F000.003F.58BF     Dynamic     GigabitEthernet 0/23     \\r\\n\\r  12  F000.003F.64A8     Dynamic     GigabitEthernet 0/23     \\n  12  F000.003F.669C     Dynamic     GigabitEthernet 0/23     \\n  12  F000.006B.DA3E     Dynamic     GigabitEthernet 0/19     \\n  12  F000.006C.4574     Dynamic     GigabitEthernet 0/19     \\n  12  F000.006C.67EE     Dynamic     GigabitEthernet 0/22     \\n  12  F000.006C.8155     Dynamic     GigabitEthernet 0/22     \\n  12  F000.006C.8167     Dynamic     GigabitEthernet 0/22     \\n  12  F079.596C.908A     Dynamic     GigabitEthernet 0/17     \\n  12  F4B5.2024.EBAF     Dynamic     GigabitEthernet 0/22     \\n  12  F4B5.2024.EF6B     Dynamic     GigabitEthernet 0/17     \\n  12  F4B5.2024.F19B     Dynamic     GigabitEthernet 0/22     \\n  12  F4B5.2024.F365     Dynamic     GigabitEthernet 0/22     \\n  12  F4B5.2024.F44C     Dynamic     GigabitEthernet 0/22     \\n  12  F4B5.203B.1E44     Dynamic     GigabitEthernet 0/22     \\n  12  F4B5.203B.1EEC     Dynamic     GigabitEthernet 0/17     \\n  12  F4B5.203B.2404     Dynamic     GigabitEthernet 0/17     \\n  12  FCAA.1422.A331     Dynamic     GigabitEthernet 0/22     \\n  12  FCAA.1470.F02E     Dynamic     GigabitEthernet 0/17     \\n  13  000C.294D.77F6     Dynamic     GigabitEthernet 0/46     \\n  13  0017.6112.B286     Dynamic     GigabitEthernet 0/45     \\n  13  00E0.FC09.BCF9     Dynamic     GigabitEthernet 0/33     \\n  13  2CEA.7FEB.B118     Dynamic     GigabitEthernet 0/33     \\n  13  2CEA.7FED.051C     Dynamic     GigabitEthernet 0/43     \\n  13  80FB.06C9.6DB9     Dynamic     GigabitEthernet 0/33     \\r\\n\\r  13  8CA6.DFC4.490D     Dynamic     GigabitEthernet 0/48     \\n  13  9CA6.15D8.F7A2     Dynamic     GigabitEthernet 0/40     \\n  13  F4B5.2018.50E7     Dynamic     GigabitEthernet 0/46     \\n  13  F4EE.0823.956A     Dynamic     GigabitEthernet 0/44     '"
      ]
     },
     "execution_count": 382,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "tabStr"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 100,
   "id": "2f6c3fe4",
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "def mac2rows(tabStr,tpl=\"display-mac-s5560s.template\"):\n",
    "    f = open(tpl)\n",
    "    template = TextFSM(f)\n",
    "    outTab = template.ParseText(tabStr)\n",
    "    return  outTab"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 101,
   "id": "e99f5a47",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "[['b83a-080e-f650', '2', 'Learned', 'GE1/0/9'],\n",
       " ['04f9-f816-6b61', '11', 'Learned', 'GE1/0/11'],\n",
       " ['3c6a-4852-c1fe', '11', 'Learned', 'GE1/0/11'],\n",
       " ['4419-b641-7795', '11', 'Learned', 'GE1/0/3'],\n",
       " ['5254-0033-e4b7', '11', 'Learned', 'GE1/0/1'],\n",
       " ['5254-00c1-4efa', '11', 'Learned', 'GE1/0/1'],\n",
       " ['5254-00d4-636c', '11', 'Learned', 'GE1/0/1'],\n",
       " ['5869-6c01-dd73', '11', 'Learned', 'GE1/0/1'],\n",
       " ['5cc9-99ea-55e0', '11', 'Learned', 'GE1/0/11'],\n",
       " ['80fb-06c9-6db9', '11', 'Learned', 'GE1/0/2'],\n",
       " ['9ca6-15d8-f7a2', '11', 'Learned', 'GE1/0/1'],\n",
       " ['acb9-2f24-2384', '11', 'Learned', 'GE1/0/1'],\n",
       " ['b42e-9968-4090', '11', 'Learned', 'GE1/0/3'],\n",
       " ['e0d5-5efa-1b79', '11', 'Learned', 'GE1/0/1'],\n",
       " ['020f-ed77-7960', '14', 'Learned', 'GE1/0/11'],\n",
       " ['80fb-06c9-6db9', '14', 'Learned', 'GE1/0/2'],\n",
       " ['4ced-fb6c-ef9f', '15', 'Learned', 'GE1/0/5'],\n",
       " ['7427-eae8-fef9', '15', 'Learned', 'GE1/0/5'],\n",
       " ['80fb-06c9-6db9', '15', 'Learned', 'GE1/0/2'],\n",
       " ['8ca6-df43-6b43', '15', 'Learned', 'GE1/0/5'],\n",
       " ['b42e-999d-1f99', '15', 'Learned', 'GE1/0/5'],\n",
       " ['b42e-99e6-3c49', '15', 'Learned', 'GE1/0/5'],\n",
       " ['00e0-4c52-032d', '17', 'Learned', 'GE1/0/7'],\n",
       " ['44a6-42b6-c0a3', '17', 'Learned', 'GE1/0/7'],\n",
       " ['4cf5-dc97-3421', '17', 'Learned', 'GE1/0/7'],\n",
       " ['4cf5-dc97-35a9', '17', 'Learned', 'GE1/0/11'],\n",
       " ['4cf5-dc97-3677', '17', 'Learned', 'GE1/0/7'],\n",
       " ['4cf5-dc97-3695', '17', 'Learned', 'GE1/0/11'],\n",
       " ['4cf5-dc97-36b4', '17', 'Learned', 'GE1/0/7'],\n",
       " ['80fb-06c9-6db9', '17', 'Learned', 'GE1/0/2'],\n",
       " ['849a-4059-b273', '17', 'Learned', 'GE1/0/7'],\n",
       " ['acb9-2f46-05f5', '17', 'Learned', 'GE1/0/7'],\n",
       " ['b42e-9979-de61', '17', 'Learned', 'GE1/0/7'],\n",
       " ['e0d5-5e56-7edb', '17', 'Learned', 'GE1/0/7'],\n",
       " ['0020-6bb3-b6d7', '20', 'Learned', 'GE1/0/9'],\n",
       " ['2428-fdc1-76e4', '20', 'Learned', 'GE1/0/9'],\n",
       " ['309c-2365-209e', '20', 'Learned', 'GE1/0/9'],\n",
       " ['3c6a-4838-ecd5', '20', 'Learned', 'GE1/0/9'],\n",
       " ['408d-5c1d-9e3e', '20', 'Learned', 'GE1/0/9'],\n",
       " ['4cf5-dc97-3471', '20', 'Learned', 'GE1/0/9'],\n",
       " ['4cf5-dc9a-c39e', '20', 'Learned', 'GE1/0/9'],\n",
       " ['807c-62bb-4e1e', '20', 'Learned', 'GE1/0/9'],\n",
       " ['80fb-06c9-6db9', '20', 'Learned', 'GE1/0/2'],\n",
       " ['8811-96af-173e', '20', 'Learned', 'GE1/0/9'],\n",
       " ['b221-0304-e64b', '20', 'Learned', 'GE1/0/9'],\n",
       " ['c85b-7669-9e16', '20', 'Learned', 'GE1/0/9'],\n",
       " ['e0d5-5ef6-fdd6', '20', 'Learned', 'GE1/0/9'],\n",
       " ['f46d-2fcf-c3ed', '20', 'Learned', 'GE1/0/9'],\n",
       " ['0017-6111-f5e7', '26', 'Learned', 'GE1/0/13'],\n",
       " ['0030-1bba-02db', '26', 'Learned', 'GE1/0/15'],\n",
       " ['00e0-4c3c-a0db', '26', 'Learned', 'GE1/0/16'],\n",
       " ['081f-7130-405c', '26', 'Learned', 'GE1/0/13'],\n",
       " ['0c9d-92cc-8c94', '26', 'Learned', 'GE1/0/16'],\n",
       " ['1012-fb7a-2656', '26', 'Learned', 'GE1/0/13'],\n",
       " ['2428-fdc1-7333', '26', 'Learned', 'GE1/0/13'],\n",
       " ['2428-fdc1-7699', '26', 'Learned', 'GE1/0/15'],\n",
       " ['2428-fdc1-76c7', '26', 'Learned', 'GE1/0/13'],\n",
       " ['2428-fdc1-76cc', '26', 'Learned', 'GE1/0/13'],\n",
       " ['2428-fddc-be9d', '26', 'Learned', 'GE1/0/13'],\n",
       " ['408d-5ce7-408c', '26', 'Learned', 'GE1/0/16'],\n",
       " ['4cb0-0810-6c1e', '26', 'Learned', 'GE1/0/13'],\n",
       " ['4cbd-8f2c-9592', '26', 'Learned', 'GE1/0/13'],\n",
       " ['4cbd-8f90-6d54', '26', 'Learned', 'GE1/0/13'],\n",
       " ['4cbd-8fcc-90b6', '26', 'Learned', 'GE1/0/13'],\n",
       " ['4cbd-8fd5-da71', '26', 'Learned', 'GE1/0/13'],\n",
       " ['4cf5-dc97-343e', '26', 'Learned', 'GE1/0/15'],\n",
       " ['4cf5-dc97-344e', '26', 'Learned', 'GE1/0/15'],\n",
       " ['4cf5-dc97-366e', '26', 'Learned', 'GE1/0/15'],\n",
       " ['5cde-3414-a887', '26', 'Learned', 'GE1/0/13'],\n",
       " ['6461-4046-fc4d', '26', 'Learned', 'GE1/0/13'],\n",
       " ['807c-6202-b8a1', '26', 'Learned', 'GE1/0/13'],\n",
       " ['80fb-06c9-6db9', '26', 'Learned', 'GE1/0/2'],\n",
       " ['a85e-455a-5a7c', '26', 'Learned', 'GE1/0/16'],\n",
       " ['a85e-45a2-e00a', '26', 'Learned', 'GE1/0/16'],\n",
       " ['accb-51de-42e4', '26', 'Learned', 'GE1/0/15'],\n",
       " ['b42e-9971-29cd', '26', 'Learned', 'GE1/0/16'],\n",
       " ['b42e-99ea-043c', '26', 'Learned', 'GE1/0/15'],\n",
       " ['e062-908d-9995', '26', 'Learned', 'GE1/0/11'],\n",
       " ['e062-90bb-c9b5', '26', 'Learned', 'GE1/0/11'],\n",
       " ['e062-90bb-da7a', '26', 'Learned', 'GE1/0/11'],\n",
       " ['f000-003b-4931', '26', 'Learned', 'GE1/0/15'],\n",
       " ['f000-003f-669d', '26', 'Learned', 'GE1/0/15'],\n",
       " ['f000-006c-6648', '26', 'Learned', 'GE1/0/15'],\n",
       " ['f000-006c-6811', '26', 'Learned', 'GE1/0/15'],\n",
       " ['f4b5-2024-ef6b', '26', 'Learned', 'GE1/0/16'],\n",
       " ['fcaa-1470-f02e', '26', 'Learned', 'GE1/0/16'],\n",
       " ['0017-6111-1ad0', '34', 'Learned', 'GE1/0/11'],\n",
       " ['0017-6112-279e', '34', 'Learned', 'GE1/0/11'],\n",
       " ['0017-6112-a93b', '34', 'Learned', 'GE1/0/11'],\n",
       " ['0017-6112-ab50', '34', 'Learned', 'GE1/0/11'],\n",
       " ['00d8-610c-3d58', '34', 'Learned', 'GE1/0/11'],\n",
       " ['00e0-0b48-a717', '34', 'Learned', 'GE1/0/11'],\n",
       " ['00e0-4c85-826d', '34', 'Learned', 'GE1/0/11'],\n",
       " ['00e0-4cff-2c14', '34', 'Learned', 'GE1/0/11'],\n",
       " ['00e0-4d95-1326', '34', 'Learned', 'GE1/0/11'],\n",
       " ['00e0-4f03-2e24', '34', 'Learned', 'GE1/0/11'],\n",
       " ['00e0-4f03-c582', '34', 'Learned', 'GE1/0/11'],\n",
       " ['0840-f360-a0d8', '34', 'Learned', 'GE1/0/11'],\n",
       " ['2428-fdc1-76d0', '34', 'Learned', 'GE1/0/11'],\n",
       " ['309c-237d-6c73', '34', 'Learned', 'GE1/0/11'],\n",
       " ['408d-5cfd-e739', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4419-b649-83af', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4419-b649-8498', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4419-b649-8575', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4419-b649-85b6', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4419-b649-8609', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4419-b649-8619', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4419-b649-86fc', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4419-b649-86fd', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4419-b649-8705', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4419-b649-8706', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4419-b649-8709', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4419-b649-870a', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4419-b649-870f', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4419-b649-8714', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4419-b649-8716', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4419-b649-8717', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4419-b649-8718', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4419-b649-871c', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4419-b649-87da', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4419-b649-87f4', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4cbd-8f2c-9572', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4cbd-8f2c-9597', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4cbd-8f79-1968', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4cbd-8f79-19ac', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4cbd-8f79-19ca', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4cbd-8f79-1b2a', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4cbd-8f79-1b53', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4cbd-8f79-1b76', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4cbd-8f79-1b7a', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4cbd-8f79-1b80', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4cbd-8f79-1b84', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4cbd-8fba-d012', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4cbd-8fba-d022', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4cbd-8fcc-9024', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4cbd-8fcc-90b8', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4cbd-8fd3-2aa9', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4cbd-8fd5-da70', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4cbd-8fd5-da85', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4cbd-8fd5-dab0', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4cbd-8fd5-dab2', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4cbd-8fd5-db1e', '34', 'Learned', 'GE1/0/11'],\n",
       " ['4cbd-8fd5-dbd4', '34', 'Learned', 'GE1/0/11'],\n",
       " ['5475-959c-548b', '34', 'Learned', 'GE1/0/11'],\n",
       " ['5850-ed6d-2f60', '34', 'Learned', 'GE1/0/11'],\n",
       " ['5850-ed6d-2f7b', '34', 'Learned', 'GE1/0/11'],\n",
       " ['5869-6c01-dd73', '34', 'Learned', 'GE1/0/11'],\n",
       " ['70b5-e874-4644', '34', 'Learned', 'GE1/0/11'],\n",
       " ['7486-e218-0a99', '34', 'Learned', 'GE1/0/11'],\n",
       " ['7486-e218-1afe', '34', 'Learned', 'GE1/0/11'],\n",
       " ['74d4-356d-891e', '34', 'Learned', 'GE1/0/11'],\n",
       " ['80fb-06c9-6db9', '34', 'Learned', 'GE1/0/2'],\n",
       " ['b42e-9904-6dda', '34', 'Learned', 'GE1/0/11'],\n",
       " ['b42e-991d-4210', '34', 'Learned', 'GE1/0/11'],\n",
       " ['b42e-9968-3f8c', '34', 'Learned', 'GE1/0/11'],\n",
       " ['b42e-997a-2550', '34', 'Learned', 'GE1/0/11'],\n",
       " ['b42e-997a-2570', '34', 'Learned', 'GE1/0/11'],\n",
       " ['b42e-99e6-329b', '34', 'Learned', 'GE1/0/11'],\n",
       " ['c051-7ea4-099f', '34', 'Learned', 'GE1/0/11'],\n",
       " ['c06d-ed2c-d964', '34', 'Learned', 'GE1/0/11'],\n",
       " ['e062-902f-e906', '34', 'Learned', 'GE1/0/11'],\n",
       " ['e062-9032-a966', '34', 'Learned', 'GE1/0/11'],\n",
       " ['e062-9082-2258', '34', 'Learned', 'GE1/0/11'],\n",
       " ['e062-9087-a15a', '34', 'Learned', 'GE1/0/11'],\n",
       " ['e062-908a-bdc9', '34', 'Learned', 'GE1/0/11'],\n",
       " ['e062-90b0-4b6a', '34', 'Learned', 'GE1/0/11'],\n",
       " ['e062-90c9-1712', '34', 'Learned', 'GE1/0/11'],\n",
       " ['e062-90dd-0803', '34', 'Learned', 'GE1/0/11'],\n",
       " ['e062-90eb-0492', '34', 'Learned', 'GE1/0/11'],\n",
       " ['e062-90f6-66b9', '34', 'Learned', 'GE1/0/11'],\n",
       " ['e0d5-5e6d-bd23', '34', 'Learned', 'GE1/0/11'],\n",
       " ['e0d5-5ec3-191d', '34', 'Learned', 'GE1/0/11'],\n",
       " ['e0d5-5efc-0288', '34', 'Learned', 'GE1/0/11'],\n",
       " ['e247-1f2c-0f6d', '34', 'Learned', 'GE1/0/11'],\n",
       " ['f000-003a-beab', '34', 'Learned', 'GE1/0/11'],\n",
       " ['f000-003a-beaf', '34', 'Learned', 'GE1/0/11'],\n",
       " ['f000-003a-beb3', '34', 'Learned', 'GE1/0/11'],\n",
       " ['f000-003a-bec0', '34', 'Learned', 'GE1/0/11'],\n",
       " ['f000-003a-bec5', '34', 'Learned', 'GE1/0/11'],\n",
       " ['f000-003a-bee5', '34', 'Learned', 'GE1/0/11'],\n",
       " ['f000-003b-4854', '34', 'Learned', 'GE1/0/11'],\n",
       " ['f000-003b-485d', '34', 'Learned', 'GE1/0/11'],\n",
       " ['f000-003b-487f', '34', 'Learned', 'GE1/0/11'],\n",
       " ['f000-003b-489a', '34', 'Learned', 'GE1/0/11'],\n",
       " ['f000-003b-48a1', '34', 'Learned', 'GE1/0/11'],\n",
       " ['f000-003b-4935', '34', 'Learned', 'GE1/0/11'],\n",
       " ['f000-003b-494a', '34', 'Learned', 'GE1/0/11'],\n",
       " ['f000-003f-589e', '34', 'Learned', 'GE1/0/11'],\n",
       " ['f000-003f-64a8', '34', 'Learned', 'GE1/0/11'],\n",
       " ['f000-006b-da3e', '34', 'Learned', 'GE1/0/11'],\n",
       " ['f000-006c-8155', '34', 'Learned', 'GE1/0/11'],\n",
       " ['f484-8df7-5db7', '34', 'Learned', 'GE1/0/11'],\n",
       " ['fcaa-1422-a331', '34', 'Learned', 'GE1/0/11'],\n",
       " ['80fb-06c9-6db9', '87', 'Learned', 'GE1/0/2'],\n",
       " ['8ce7-486e-bf80', '87', 'Learned', 'GE1/0/11'],\n",
       " ['f000-003f-58bf', '87', 'Learned', 'GE1/0/11'],\n",
       " ['f000-003f-669c', '87', 'Learned', 'GE1/0/11'],\n",
       " ['2428-fdc1-76a4', '88', 'Learned', 'GE1/0/11'],\n",
       " ['4cbd-8f2c-957c', '88', 'Learned', 'GE1/0/11'],\n",
       " ['4cbd-8f90-7198', '88', 'Learned', 'GE1/0/11'],\n",
       " ['4cbd-8f90-719c', '88', 'Learned', 'GE1/0/11'],\n",
       " ['4cbd-8f90-71a7', '88', 'Learned', 'GE1/0/11'],\n",
       " ['4cbd-8fd5-da6e', '88', 'Learned', 'GE1/0/11'],\n",
       " ['686d-bcf6-0e91', '88', 'Learned', 'GE1/0/11'],\n",
       " ['80fb-06c9-6db9', '88', 'Learned', 'GE1/0/2'],\n",
       " ['0017-6112-b286', '100', 'Learned', 'GE1/0/24'],\n",
       " ['00e0-66ff-1b5f', '100', 'Learned', 'GE1/0/24'],\n",
       " ['2cea-7feb-b118', '100', 'Learned', 'GE1/0/24'],\n",
       " ['2cea-7fed-051c', '100', 'Learned', 'GE1/0/24'],\n",
       " ['5254-0018-e279', '100', 'Learned', 'GE1/0/24'],\n",
       " ['5254-0043-41b8', '100', 'Learned', 'GE1/0/24'],\n",
       " ['5254-00e7-b127', '100', 'Learned', 'GE1/0/24'],\n",
       " ['5254-00fb-434e', '100', 'Learned', 'GE1/0/24'],\n",
       " ['5869-6c01-dd73', '100', 'Learned', 'GE1/0/24'],\n",
       " ['80fb-06c9-6db9', '100', 'Learned', 'GE1/0/2'],\n",
       " ['8ca6-dfc4-490d', '100', 'Learned', 'GE1/0/24'],\n",
       " ['f4b5-2018-50e7', '100', 'Learned', 'GE1/0/24'],\n",
       " ['f4ee-0823-956a', '100', 'Learned', 'GE1/0/24'],\n",
       " ['081f-7102-95de', '200', 'Learned', 'GE1/0/2'],\n",
       " ['80fb-06c9-6db9', '200', 'Learned', 'GE1/0/2']]"
      ]
     },
     "execution_count": 101,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "tabStr = list2str(tabLs)\n",
    "outTab = mac2rows(tabStr)\n",
    "outTab"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 85,
   "id": "aeee10e1",
   "metadata": {},
   "outputs": [
    {
     "ename": "NameError",
     "evalue": "name 'outTab' is not defined",
     "output_type": "error",
     "traceback": [
      "\u001b[1;31m---------------------------------------------------------------------------\u001b[0m",
      "\u001b[1;31mNameError\u001b[0m                                 Traceback (most recent call last)",
      "Cell \u001b[1;32mIn[85], line 16\u001b[0m\n\u001b[0;32m     13\u001b[0m     \u001b[38;5;28mprint\u001b[39m(macJson)\n\u001b[0;32m     14\u001b[0m     \u001b[38;5;28;01mreturn\u001b[39;00m macJson \n\u001b[1;32m---> 16\u001b[0m mac2json(\u001b[43moutTab\u001b[49m)\n",
      "\u001b[1;31mNameError\u001b[0m: name 'outTab' is not defined"
     ]
    }
   ],
   "source": [
    "        \n",
    "def mac2json(ls):\n",
    "    \"\"\"  带表头 col \"\"\"\n",
    "    rows = []\n",
    "    for row in ls:\n",
    "        #print(row)\n",
    "        keys = ['vlan','mac','type', 'port']\n",
    "        #--转换 大小写\n",
    "        \n",
    "        dc = dict(zip(keys, row))\n",
    "        dc['mac'] =dc['mac'].replace(\".\", \"-\").lower()\n",
    "        rows.append(dc)\n",
    "    macJson = rows#json.dumps(rows, sort_keys=True, indent=4, separators=(',', ': '))\n",
    "    print(macJson)\n",
    "    return macJson \n",
    "   \n",
    "mac2json(outTab)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "934c0771",
   "metadata": {},
   "outputs": [],
   "source": [
    "mac2json()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 387,
   "id": "b4667bcc",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "   1  0020.6BA3.4D7C     Dynamic     GigabitEthernet 0/1      \n",
      "   1  00D8.610C.3D58     Dynamic     GigabitEthernet 0/1      \n",
      "   1  00E0.0B48.A717     Dynamic     GigabitEthernet 0/1      \n",
      "   1  00E0.4C37.ACE4     Dynamic     GigabitEthernet 0/1      \n",
      "   1  00E0.4C3C.A0DB     Dynamic     GigabitEthernet 0/1      \n",
      "   1  00E0.4C52.032D     Dynamic     GigabitEthernet 0/1      \n",
      "   1  00E0.4C57.9160     Dynamic     GigabitEthernet 0/1      \n",
      "   1  00E0.4C85.826D     Dynamic     GigabitEthernet 0/1      \n",
      "   1  00E0.4CFF.2C14     Dynamic     GigabitEthernet 0/1      \n",
      "   1  00E0.4D95.1326     Dynamic     GigabitEthernet 0/1      \n",
      "   1  00E0.4F03.2E24     Dynamic     GigabitEthernet 0/1      \n",
      "   1  00E0.4F03.C582     Dynamic     GigabitEthernet 0/1      \n",
      "   1  00E0.7070.DE71     Dynamic     GigabitEthernet 0/1      \n",
      "   1  00E0.FC09.BCF9     Dynamic     GigabitEthernet 0/1      \n",
      "   1  0259.E77D.711A     Dynamic     GigabitEthernet 0/1      \n",
      "   1  0800.2740.3822     Dynamic     GigabitEthernet 0/4      \n",
      "   1  0C9D.920F.C668     Dynamic     GigabitEthernet 0/1      \n",
      "   1  1012.FB7A.2656     Dynamic     GigabitEthernet 0/1      \n",
      "   1  18C0.4D1B.C69E     Dynamic     GigabitEthernet 0/1      \n",
      "   1  18C0.4DF8.7658     Dynamic     GigabitEthernet 0/1      \n",
      "   1  2428.FDC1.7333     Dynamic     GigabitEthernet 0/1      \r\n",
      "\r",
      "   1  2428.FDC1.7698     Dynamic     GigabitEthernet 0/1      \n",
      "   1  2428.FDC1.7699     Dynamic     GigabitEthernet 0/1      \n",
      "   1  2428.FDC1.76A4     Dynamic     GigabitEthernet 0/1      \n",
      "   1  2428.FDC1.76C7     Dynamic     GigabitEthernet 0/1      \n",
      "   1  2428.FDC1.76CC     Dynamic     GigabitEthernet 0/1      \n",
      "   1  2428.FDC1.76D0     Dynamic     GigabitEthernet 0/1      \n",
      "   1  2428.FDC1.76E4     Dynamic     GigabitEthernet 0/1      \n",
      "   1  2428.FDDC.BE9D     Dynamic     GigabitEthernet 0/1      \n",
      "   1  309C.2365.209E     Dynamic     GigabitEthernet 0/1      \n",
      "   1  309C.237D.6C73     Dynamic     GigabitEthernet 0/1      \n",
      "   1  309C.23B9.101A     Dynamic     GigabitEthernet 0/1      \n",
      "   1  408D.5C1D.9E3E     Dynamic     GigabitEthernet 0/1      \n",
      "   1  408D.5C8F.2ACA     Dynamic     GigabitEthernet 0/1      \n",
      "   1  408D.5CE7.408C     Dynamic     GigabitEthernet 0/1      \n",
      "   1  40B0.765F.6E47     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4419.B641.7795     Dynamic     GigabitEthernet 0/4      \n",
      "   1  4419.B649.83AF     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4419.B649.8498     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4419.B649.8575     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4419.B649.85B6     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4419.B649.8609     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4419.B649.8619     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4419.B649.86FC     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4419.B649.86FD     Dynamic     GigabitEthernet 0/1      \r\n",
      "\r",
      "   1  4419.B649.8705     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4419.B649.8706     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4419.B649.8709     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4419.B649.870A     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4419.B649.870F     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4419.B649.8714     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4419.B649.8716     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4419.B649.8717     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4419.B649.8718     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4419.B649.871C     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4419.B649.87DA     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4419.B649.87F4     Dynamic     GigabitEthernet 0/1      \n",
      "   1  44A6.42B6.C0A3     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CB0.0810.6C1E     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CBD.8F2C.9572     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CBD.8F2C.957C     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CBD.8F2C.9597     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CBD.8F79.1968     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CBD.8F79.19AC     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CBD.8F79.19CA     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CBD.8F79.1B2A     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CBD.8F79.1B53     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CBD.8F79.1B76     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CBD.8F79.1B7A     Dynamic     GigabitEthernet 0/1      \r\n",
      "\r",
      "   1  4CBD.8F79.1B80     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CBD.8F79.1B84     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CBD.8F90.6D54     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CBD.8F90.7198     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CBD.8F90.719C     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CBD.8F90.71A7     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CBD.8FBA.D012     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CBD.8FBA.D022     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CBD.8FCC.9024     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CBD.8FCC.90B6     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CBD.8FCC.90B8     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CBD.8FD3.2AA9     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CBD.8FD5.DA6E     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CBD.8FD5.DA70     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CBD.8FD5.DA71     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CBD.8FD5.DA85     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CBD.8FD5.DA95     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CBD.8FD5.DAB0     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CBD.8FD5.DAB2     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CBD.8FD5.DB1E     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CBD.8FD5.DBD4     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CED.FB41.FB44     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CED.FB41.FBA5     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CED.FB6C.EF9F     Dynamic     GigabitEthernet 0/1      \r\n",
      "\r",
      "   1  4CF5.DC97.3421     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CF5.DC97.343E     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CF5.DC97.344E     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CF5.DC97.3471     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CF5.DC97.35A9     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CF5.DC97.366E     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CF5.DC97.3677     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CF5.DC97.3695     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CF5.DC97.36B4     Dynamic     GigabitEthernet 0/1      \n",
      "   1  4CF5.DC9A.C39E     Dynamic     GigabitEthernet 0/1      \n",
      "   1  5475.959C.548B     Dynamic     GigabitEthernet 0/1      \n",
      "   1  5850.ED6D.2F60     Dynamic     GigabitEthernet 0/1      \n",
      "   1  5850.ED6D.2F7B     Dynamic     GigabitEthernet 0/1      \n",
      "   1  5869.6C01.DD72     Static      CPU                      \n",
      "   1  6045.CB7F.C902     Dynamic     GigabitEthernet 0/1      \n",
      "   1  686D.BCF6.0E91     Dynamic     GigabitEthernet 0/1      \n",
      "   1  70B5.E874.56E5     Dynamic     GigabitEthernet 0/1      \n",
      "   1  70B5.E874.5732     Dynamic     GigabitEthernet 0/1      \n",
      "   1  728A.A3BA.DA4F     Dynamic     GigabitEthernet 0/1      \n",
      "   1  7405.A563.FBA3     Dynamic     GigabitEthernet 0/1      \n",
      "   1  7427.EAE8.FEF9     Dynamic     GigabitEthernet 0/1      \n",
      "   1  7486.E218.0A99     Dynamic     GigabitEthernet 0/1      \n",
      "   1  7486.E218.1AFE     Dynamic     GigabitEthernet 0/1      \n",
      "   1  74D4.356D.891E     Dynamic     GigabitEthernet 0/1      \r\n",
      "\r",
      "   1  807C.6202.B8A1     Dynamic     GigabitEthernet 0/1      \n",
      "   1  807C.62BB.4E1E     Dynamic     GigabitEthernet 0/1      \n",
      "   1  80FB.06C9.6DB9     Dynamic     GigabitEthernet 0/1      \n",
      "   1  8220.C9C9.82B6     Dynamic     GigabitEthernet 0/1      \n",
      "   1  8469.9386.4585     Dynamic     GigabitEthernet 0/1      \n",
      "   1  849A.4059.B273     Dynamic     GigabitEthernet 0/1      \n",
      "   1  8630.12F1.DA35     Dynamic     GigabitEthernet 0/1      \n",
      "   1  8811.96AF.173E     Dynamic     GigabitEthernet 0/1      \n",
      "   1  8CE7.486E.BF80     Dynamic     GigabitEthernet 0/1      \n",
      "   1  A85E.455A.5A7C     Dynamic     GigabitEthernet 0/1      \n",
      "   1  A85E.45A0.0ACE     Dynamic     GigabitEthernet 0/1      \n",
      "   1  A85E.45A0.0B0E     Dynamic     GigabitEthernet 0/1      \n",
      "   1  ACB9.2F24.2384     Dynamic     GigabitEthernet 0/3      \n",
      "   1  ACB9.2F46.05F5     Dynamic     GigabitEthernet 0/1      \n",
      "   1  ACCB.51DE.42E4     Dynamic     GigabitEthernet 0/1      \n",
      "   1  B42E.9904.6DDA     Dynamic     GigabitEthernet 0/1      \n",
      "   1  B42E.991D.4210     Dynamic     GigabitEthernet 0/1      \n",
      "   1  B42E.9944.2E6E     Dynamic     GigabitEthernet 0/1      \n",
      "   1  B42E.9968.3F8C     Dynamic     GigabitEthernet 0/1      \n",
      "   1  B42E.9968.4090     Dynamic     GigabitEthernet 0/4      \n",
      "   1  B42E.9971.29CD     Dynamic     GigabitEthernet 0/1      \n",
      "   1  B42E.9979.DE61     Dynamic     GigabitEthernet 0/1      \n",
      "   1  B42E.997A.2550     Dynamic     GigabitEthernet 0/1      \n",
      "   1  B42E.997A.2570     Dynamic     GigabitEthernet 0/1      \r\n",
      "\r",
      "   1  B42E.999D.1F99     Dynamic     GigabitEthernet 0/1      \n",
      "   1  B42E.99E6.329B     Dynamic     GigabitEthernet 0/1      \n",
      "   1  B42E.99E6.3C49     Dynamic     GigabitEthernet 0/1      \n",
      "   1  B83A.080E.F650     Dynamic     GigabitEthernet 0/1      \n",
      "   1  C051.7EA4.099F     Dynamic     GigabitEthernet 0/1      \n",
      "   1  C06D.ED2C.D964     Dynamic     GigabitEthernet 0/1      \n",
      "   1  D45D.6439.A7A3     Dynamic     GigabitEthernet 0/1      \n",
      "   1  E062.908D.9995     Dynamic     GigabitEthernet 0/1      \n",
      "   1  E062.90BB.C9B5     Dynamic     GigabitEthernet 0/1      \n",
      "   1  E062.90BB.DA7A     Dynamic     GigabitEthernet 0/1      \n",
      "   1  E0D5.5E51.EA27     Dynamic     GigabitEthernet 0/1      \n",
      "   1  E0D5.5E56.7EDB     Dynamic     GigabitEthernet 0/1      \n",
      "   1  E0D5.5E6D.BD23     Dynamic     GigabitEthernet 0/1      \n",
      "   1  E0D5.5EC3.191D     Dynamic     GigabitEthernet 0/1      \n",
      "   1  E0D5.5ED5.47EE     Dynamic     GigabitEthernet 0/1      \n",
      "   1  E0D5.5EFC.0288     Dynamic     GigabitEthernet 0/1      \n",
      "   1  E0D5.5EFC.0D5F     Dynamic     GigabitEthernet 0/1      \n",
      "   1  E86A.642E.0446     Dynamic     GigabitEthernet 0/1      \n",
      "   1  F000.003A.BEAB     Dynamic     GigabitEthernet 0/1      \n",
      "   1  F000.003A.BEAF     Dynamic     GigabitEthernet 0/1      \n",
      "   1  F000.003A.BEB3     Dynamic     GigabitEthernet 0/1      \n",
      "   1  F000.003A.BEC0     Dynamic     GigabitEthernet 0/1      \n",
      "   1  F000.003A.BEC5     Dynamic     GigabitEthernet 0/1      \n",
      "   1  F000.003B.4854     Dynamic     GigabitEthernet 0/1      \r\n",
      "\r",
      "   1  F000.003B.485D     Dynamic     GigabitEthernet 0/1      \n",
      "   1  F000.003B.487F     Dynamic     GigabitEthernet 0/1      \n",
      "   1  F000.003B.489A     Dynamic     GigabitEthernet 0/1      \n",
      "   1  F000.003B.48A1     Dynamic     GigabitEthernet 0/1      \n",
      "   1  F000.003B.4935     Dynamic     GigabitEthernet 0/1      \n",
      "   1  F000.003B.494A     Dynamic     GigabitEthernet 0/1      \n",
      "   1  F000.003F.58BF     Dynamic     GigabitEthernet 0/1      \n",
      "   1  F000.003F.669C     Dynamic     GigabitEthernet 0/1      \n",
      "   1  F079.596C.908A     Dynamic     GigabitEthernet 0/1      \n",
      "   1  F4B5.2024.EBAF     Dynamic     GigabitEthernet 0/1      \n",
      "   1  F4B5.2024.EF6B     Dynamic     GigabitEthernet 0/1      \n",
      "   1  F4B5.2024.F19B     Dynamic     GigabitEthernet 0/1      \n",
      "   1  F4B5.2024.F365     Dynamic     GigabitEthernet 0/1      \n",
      "   1  F4B5.2024.F44C     Dynamic     GigabitEthernet 0/1      \n",
      "   1  F4B5.203B.1E44     Dynamic     GigabitEthernet 0/1      \n",
      "   1  F4B5.203B.1EEC     Dynamic     GigabitEthernet 0/1      \n",
      "   1  F4B5.203B.2404     Dynamic     GigabitEthernet 0/1      \n",
      "   1  FCAA.1422.A331     Dynamic     GigabitEthernet 0/1      \n",
      "   1  FCAA.1470.F02E     Dynamic     GigabitEthernet 0/1      \n",
      "  12  0017.6111.1AD0     Dynamic     GigabitEthernet 0/23     \n",
      "  12  0017.6112.279E     Dynamic     GigabitEthernet 0/22     \n",
      "  12  0017.6112.A93B     Dynamic     GigabitEthernet 0/22     \n",
      "  12  0017.6112.AB50     Dynamic     GigabitEthernet 0/22     \n",
      "  12  0020.6BA3.4D7C     Dynamic     GigabitEthernet 0/17     \r\n",
      "\r",
      "  12  00D8.610C.3D58     Dynamic     GigabitEthernet 0/23     \n",
      "  12  00E0.0B48.A717     Dynamic     GigabitEthernet 0/22     \n",
      "  12  00E0.4C37.ACE4     Dynamic     GigabitEthernet 0/22     \n",
      "  12  00E0.4C3C.A0DB     Dynamic     GigabitEthernet 0/17     \n",
      "  12  00E0.4C52.032D     Dynamic     GigabitEthernet 0/17     \n",
      "  12  00E0.4C57.9160     Dynamic     GigabitEthernet 0/17     \n",
      "  12  00E0.4C85.826D     Dynamic     GigabitEthernet 0/23     \n",
      "  12  00E0.4CFF.2C14     Dynamic     GigabitEthernet 0/22     \n",
      "  12  00E0.4D95.1326     Dynamic     GigabitEthernet 0/19     \n",
      "  12  00E0.4F03.2E24     Dynamic     GigabitEthernet 0/23     \n",
      "  12  00E0.4F03.C582     Dynamic     GigabitEthernet 0/22     \n",
      "  12  00E0.7070.DE71     Dynamic     GigabitEthernet 0/23     \n",
      "  12  00E0.FC09.BCF9     Dynamic     GigabitEthernet 0/17     \n",
      "  12  020F.ED77.7960     Dynamic     GigabitEthernet 0/22     \n",
      "  12  0259.E77D.711A     Dynamic     GigabitEthernet 0/17     \n",
      "  12  0800.2740.3822     Dynamic     GigabitEthernet 0/17     \n",
      "  12  081F.7150.30DE     Dynamic     GigabitEthernet 0/22     \n",
      "  12  0840.F360.A0D8     Dynamic     GigabitEthernet 0/22     \n",
      "  12  0C9D.920F.C668     Dynamic     GigabitEthernet 0/19     \n",
      "  12  1012.FB7A.2656     Dynamic     GigabitEthernet 0/17     \n",
      "  12  18C0.4D1B.C69E     Dynamic     GigabitEthernet 0/17     \n",
      "  12  18C0.4DF8.7658     Dynamic     GigabitEthernet 0/23     \n",
      "  12  2428.FDC1.7333     Dynamic     GigabitEthernet 0/17     \n",
      "  12  2428.FDC1.7698     Dynamic     GigabitEthernet 0/17     \r\n",
      "\r",
      "  12  2428.FDC1.7699     Dynamic     GigabitEthernet 0/17     \n",
      "  12  2428.FDC1.76A4     Dynamic     GigabitEthernet 0/22     \n",
      "  12  2428.FDC1.76C7     Dynamic     GigabitEthernet 0/17     \n",
      "  12  2428.FDC1.76CC     Dynamic     GigabitEthernet 0/17     \n",
      "  12  2428.FDC1.76D0     Dynamic     GigabitEthernet 0/23     \n",
      "  12  2428.FDC1.76E4     Dynamic     GigabitEthernet 0/17     \n",
      "  12  2428.FDDC.BE9D     Dynamic     GigabitEthernet 0/17     \n",
      "  12  24CF.24A4.2DA8     Dynamic     GigabitEthernet 0/23     \n",
      "  12  309C.2365.209E     Dynamic     GigabitEthernet 0/17     \n",
      "  12  309C.237D.6C73     Dynamic     GigabitEthernet 0/22     \n",
      "  12  309C.23B9.101A     Dynamic     GigabitEthernet 0/17     \n",
      "  12  408D.5C1D.9E3E     Dynamic     GigabitEthernet 0/17     \n",
      "  12  408D.5C8F.2ACA     Dynamic     GigabitEthernet 0/17     \n",
      "  12  408D.5CE7.408C     Dynamic     GigabitEthernet 0/17     \n",
      "  12  40B0.765F.6E47     Dynamic     GigabitEthernet 0/17     \n",
      "  12  4419.B641.7795     Dynamic     GigabitEthernet 0/17     \n",
      "  12  4419.B649.83AF     Dynamic     GigabitEthernet 0/23     \n",
      "  12  4419.B649.8498     Dynamic     GigabitEthernet 0/23     \n",
      "  12  4419.B649.8575     Dynamic     GigabitEthernet 0/23     \n",
      "  12  4419.B649.85B6     Dynamic     GigabitEthernet 0/23     \n",
      "  12  4419.B649.8609     Dynamic     GigabitEthernet 0/23     \n",
      "  12  4419.B649.8619     Dynamic     GigabitEthernet 0/23     \n",
      "  12  4419.B649.86FC     Dynamic     GigabitEthernet 0/23     \n",
      "  12  4419.B649.86FD     Dynamic     GigabitEthernet 0/23     \r\n",
      "\r",
      "  12  4419.B649.8705     Dynamic     GigabitEthernet 0/23     \n",
      "  12  4419.B649.8706     Dynamic     GigabitEthernet 0/23     \n",
      "  12  4419.B649.8709     Dynamic     GigabitEthernet 0/23     \n",
      "  12  4419.B649.870A     Dynamic     GigabitEthernet 0/23     \n",
      "  12  4419.B649.870F     Dynamic     GigabitEthernet 0/23     \n",
      "  12  4419.B649.8714     Dynamic     GigabitEthernet 0/23     \n",
      "  12  4419.B649.8716     Dynamic     GigabitEthernet 0/23     \n",
      "  12  4419.B649.8717     Dynamic     GigabitEthernet 0/23     \n",
      "  12  4419.B649.8718     Dynamic     GigabitEthernet 0/23     \n",
      "  12  4419.B649.871C     Dynamic     GigabitEthernet 0/23     \n",
      "  12  4419.B649.87DA     Dynamic     GigabitEthernet 0/23     \n",
      "  12  4419.B649.87F4     Dynamic     GigabitEthernet 0/23     \n",
      "  12  44A6.42B6.C0A3     Dynamic     GigabitEthernet 0/17     \n",
      "  12  4CB0.0810.6C1E     Dynamic     GigabitEthernet 0/17     \n",
      "  12  4CBD.8F2C.9572     Dynamic     GigabitEthernet 0/23     \n",
      "  12  4CBD.8F2C.957C     Dynamic     GigabitEthernet 0/23     \n",
      "  12  4CBD.8F2C.9597     Dynamic     GigabitEthernet 0/23     \n",
      "  12  4CBD.8F79.1968     Dynamic     GigabitEthernet 0/22     \n",
      "  12  4CBD.8F79.19AC     Dynamic     GigabitEthernet 0/22     \n",
      "  12  4CBD.8F79.19CA     Dynamic     GigabitEthernet 0/23     \n",
      "  12  4CBD.8F79.1B2A     Dynamic     GigabitEthernet 0/22     \n",
      "  12  4CBD.8F79.1B53     Dynamic     GigabitEthernet 0/22     \n",
      "  12  4CBD.8F79.1B76     Dynamic     GigabitEthernet 0/22     \n",
      "  12  4CBD.8F79.1B7A     Dynamic     GigabitEthernet 0/22     \r\n",
      "\r",
      "  12  4CBD.8F79.1B80     Dynamic     GigabitEthernet 0/22     \n",
      "  12  4CBD.8F79.1B84     Dynamic     GigabitEthernet 0/22     \n",
      "  12  4CBD.8F90.6D54     Dynamic     GigabitEthernet 0/17     \n",
      "  12  4CBD.8F90.7198     Dynamic     GigabitEthernet 0/23     \n",
      "  12  4CBD.8F90.719C     Dynamic     GigabitEthernet 0/22     \n",
      "  12  4CBD.8F90.71A7     Dynamic     GigabitEthernet 0/22     \n",
      "  12  4CBD.8FBA.D012     Dynamic     GigabitEthernet 0/22     \n",
      "  12  4CBD.8FBA.D022     Dynamic     GigabitEthernet 0/22     \n",
      "  12  4CBD.8FCC.9024     Dynamic     GigabitEthernet 0/23     \n",
      "  12  4CBD.8FCC.90B6     Dynamic     GigabitEthernet 0/17     \n",
      "  12  4CBD.8FCC.90B8     Dynamic     GigabitEthernet 0/23     \n",
      "  12  4CBD.8FD3.2AA9     Dynamic     GigabitEthernet 0/22     \n",
      "  12  4CBD.8FD5.DA6E     Dynamic     GigabitEthernet 0/22     \n",
      "  12  4CBD.8FD5.DA70     Dynamic     GigabitEthernet 0/23     \n",
      "  12  4CBD.8FD5.DA71     Dynamic     GigabitEthernet 0/17     \n",
      "  12  4CBD.8FD5.DA85     Dynamic     GigabitEthernet 0/23     \n",
      "  12  4CBD.8FD5.DA95     Dynamic     GigabitEthernet 0/22     \n",
      "  12  4CBD.8FD5.DAB0     Dynamic     GigabitEthernet 0/22     \n",
      "  12  4CBD.8FD5.DAB2     Dynamic     GigabitEthernet 0/22     \n",
      "  12  4CBD.8FD5.DB1E     Dynamic     GigabitEthernet 0/22     \n",
      "  12  4CBD.8FD5.DBD4     Dynamic     GigabitEthernet 0/22     \n",
      "  12  4CED.FB41.FB44     Dynamic     GigabitEthernet 0/19     \n",
      "  12  4CED.FB41.FBA5     Dynamic     GigabitEthernet 0/17     \n",
      "  12  4CED.FB6C.EF9F     Dynamic     GigabitEthernet 0/17     \r\n",
      "\r",
      "  12  4CF5.DC97.3421     Dynamic     GigabitEthernet 0/17     \n",
      "  12  4CF5.DC97.343E     Dynamic     GigabitEthernet 0/17     \n",
      "  12  4CF5.DC97.344E     Dynamic     GigabitEthernet 0/17     \n",
      "  12  4CF5.DC97.3471     Dynamic     GigabitEthernet 0/17     \n",
      "  12  4CF5.DC97.35A9     Dynamic     GigabitEthernet 0/23     \n",
      "  12  4CF5.DC97.366E     Dynamic     GigabitEthernet 0/17     \n",
      "  12  4CF5.DC97.3677     Dynamic     GigabitEthernet 0/17     \n",
      "  12  4CF5.DC97.3695     Dynamic     GigabitEthernet 0/23     \n",
      "  12  4CF5.DC97.36B4     Dynamic     GigabitEthernet 0/17     \n",
      "  12  4CF5.DC9A.C39E     Dynamic     GigabitEthernet 0/17     \n",
      "  12  5475.959C.548B     Dynamic     GigabitEthernet 0/23     \n",
      "  12  5850.ED6D.2F60     Dynamic     GigabitEthernet 0/19     \n",
      "  12  5850.ED6D.2F7B     Dynamic     GigabitEthernet 0/19     \n",
      "  12  5CDE.34F7.014D     Dynamic     GigabitEthernet 0/19     \n",
      "  12  6045.CB7F.C902     Dynamic     GigabitEthernet 0/23     \n",
      "  12  686D.BCF6.0E91     Dynamic     GigabitEthernet 0/22     \n",
      "  12  70B5.E874.4644     Dynamic     GigabitEthernet 0/22     \n",
      "  12  70B5.E874.56E5     Dynamic     GigabitEthernet 0/17     \n",
      "  12  70B5.E874.5732     Dynamic     GigabitEthernet 0/17     \n",
      "  12  70B5.E874.5844     Dynamic     GigabitEthernet 0/22     \n",
      "  12  728A.A3BA.DA4F     Dynamic     GigabitEthernet 0/17     \n",
      "  12  7405.A563.FBA3     Dynamic     GigabitEthernet 0/23     \n",
      "  12  7427.EAE8.FEF9     Dynamic     GigabitEthernet 0/17     \n",
      "  12  7486.E218.0A99     Dynamic     GigabitEthernet 0/19     \r\n",
      "\r",
      "  12  7486.E218.1AFE     Dynamic     GigabitEthernet 0/19     \n",
      "  12  74D4.356D.891E     Dynamic     GigabitEthernet 0/22     \n",
      "  12  807C.6202.B8A1     Dynamic     GigabitEthernet 0/17     \n",
      "  12  807C.62BB.4E1E     Dynamic     GigabitEthernet 0/17     \n",
      "  12  80FB.06C9.6DB9     Dynamic     GigabitEthernet 0/17     \n",
      "  12  8220.C9C9.82B6     Dynamic     GigabitEthernet 0/17     \n",
      "  12  8269.C0E2.CBE1     Dynamic     GigabitEthernet 0/22     \n",
      "  12  8469.9386.4585     Dynamic     GigabitEthernet 0/19     \n",
      "  12  849A.4059.B273     Dynamic     GigabitEthernet 0/17     \n",
      "  12  8630.12F1.DA35     Dynamic     GigabitEthernet 0/17     \n",
      "  12  8811.96AF.173E     Dynamic     GigabitEthernet 0/17     \n",
      "  12  8CE7.486E.BF80     Dynamic     GigabitEthernet 0/23     \n",
      "  12  A85E.455A.5A7C     Dynamic     GigabitEthernet 0/17     \n",
      "  12  A85E.45A0.0ACE     Dynamic     GigabitEthernet 0/17     \n",
      "  12  A85E.45A0.0B0E     Dynamic     GigabitEthernet 0/23     \n",
      "  12  ACB9.2F24.2384     Dynamic     GigabitEthernet 0/17     \n",
      "  12  ACB9.2F46.05F5     Dynamic     GigabitEthernet 0/17     \n",
      "  12  ACCB.51DE.42E4     Dynamic     GigabitEthernet 0/17     \n",
      "  12  B42E.9904.6DDA     Dynamic     GigabitEthernet 0/26     \n",
      "  12  B42E.991D.4210     Dynamic     GigabitEthernet 0/22     \n",
      "  12  B42E.9944.2E6E     Dynamic     GigabitEthernet 0/23     \n",
      "  12  B42E.9968.3F8C     Dynamic     GigabitEthernet 0/23     \n",
      "  12  B42E.9968.4090     Dynamic     GigabitEthernet 0/17     \n",
      "  12  B42E.9971.29CD     Dynamic     GigabitEthernet 0/17     \r\n",
      "\r",
      "  12  B42E.9979.DE61     Dynamic     GigabitEthernet 0/17     \n",
      "  12  B42E.997A.2550     Dynamic     GigabitEthernet 0/22     \n",
      "  12  B42E.997A.2570     Dynamic     GigabitEthernet 0/22     \n",
      "  12  B42E.999D.1F99     Dynamic     GigabitEthernet 0/17     \n",
      "  12  B42E.99E6.329B     Dynamic     GigabitEthernet 0/22     \n",
      "  12  B42E.99E6.3C49     Dynamic     GigabitEthernet 0/17     \n",
      "  12  B42E.99EA.043C     Dynamic     GigabitEthernet 0/23     \n",
      "  12  B83A.080E.F650     Dynamic     GigabitEthernet 0/17     \n",
      "  12  C051.7EA4.099F     Dynamic     GigabitEthernet 0/23     \n",
      "  12  C06D.ED2C.D964     Dynamic     GigabitEthernet 0/19     \n",
      "  12  D45D.6439.A7A3     Dynamic     GigabitEthernet 0/17     \n",
      "  12  E062.902F.E906     Dynamic     GigabitEthernet 0/22     \n",
      "  12  E062.9032.A966     Dynamic     GigabitEthernet 0/22     \n",
      "  12  E062.9082.2258     Dynamic     GigabitEthernet 0/22     \n",
      "  12  E062.9087.A15A     Dynamic     GigabitEthernet 0/22     \n",
      "  12  E062.908A.BDC9     Dynamic     GigabitEthernet 0/22     \n",
      "  12  E062.908D.9995     Dynamic     GigabitEthernet 0/23     \n",
      "  12  E062.90B0.4B6A     Dynamic     GigabitEthernet 0/22     \n",
      "  12  E062.90BB.C9B5     Dynamic     GigabitEthernet 0/23     \n",
      "  12  E062.90BB.DA7A     Dynamic     GigabitEthernet 0/23     \n",
      "  12  E062.90C9.1712     Dynamic     GigabitEthernet 0/22     \n",
      "  12  E062.90DD.0803     Dynamic     GigabitEthernet 0/22     \n",
      "  12  E062.90EB.0492     Dynamic     GigabitEthernet 0/22     \n",
      "  12  E062.90F6.66B9     Dynamic     GigabitEthernet 0/22     \r\n",
      "\r",
      "  12  E0D5.5E51.EA27     Dynamic     GigabitEthernet 0/22     \n",
      "  12  E0D5.5E56.7EDB     Dynamic     GigabitEthernet 0/17     \n",
      "  12  E0D5.5E6D.BD23     Dynamic     GigabitEthernet 0/26     \n",
      "  12  E0D5.5EC3.191D     Dynamic     GigabitEthernet 0/22     \n",
      "  12  E0D5.5ED5.47EE     Dynamic     GigabitEthernet 0/19     \n",
      "  12  E0D5.5EFC.0288     Dynamic     GigabitEthernet 0/23     \n",
      "  12  E0D5.5EFC.0D5F     Dynamic     GigabitEthernet 0/17     \n",
      "  12  E247.1F2C.0F6D     Dynamic     GigabitEthernet 0/22     \n",
      "  12  E86A.642E.0446     Dynamic     GigabitEthernet 0/17     \n",
      "  12  F000.003A.BEAB     Dynamic     GigabitEthernet 0/23     \n",
      "  12  F000.003A.BEAF     Dynamic     GigabitEthernet 0/22     \n",
      "  12  F000.003A.BEB3     Dynamic     GigabitEthernet 0/22     \n",
      "  12  F000.003A.BEC0     Dynamic     GigabitEthernet 0/23     \n",
      "  12  F000.003A.BEC5     Dynamic     GigabitEthernet 0/22     \n",
      "  12  F000.003A.BEE5     Dynamic     GigabitEthernet 0/22     \n",
      "  12  F000.003B.4854     Dynamic     GigabitEthernet 0/23     \n",
      "  12  F000.003B.485D     Dynamic     GigabitEthernet 0/22     \n",
      "  12  F000.003B.487F     Dynamic     GigabitEthernet 0/22     \n",
      "  12  F000.003B.489A     Dynamic     GigabitEthernet 0/22     \n",
      "  12  F000.003B.48A1     Dynamic     GigabitEthernet 0/22     \n",
      "  12  F000.003B.4935     Dynamic     GigabitEthernet 0/22     \n",
      "  12  F000.003B.494A     Dynamic     GigabitEthernet 0/22     \n",
      "  12  F000.003F.589E     Dynamic     GigabitEthernet 0/23     \n",
      "  12  F000.003F.58BF     Dynamic     GigabitEthernet 0/23     \r\n",
      "\r",
      "  12  F000.003F.64A8     Dynamic     GigabitEthernet 0/23     \n",
      "  12  F000.003F.669C     Dynamic     GigabitEthernet 0/23     \n",
      "  12  F000.006B.DA3E     Dynamic     GigabitEthernet 0/19     \n",
      "  12  F000.006C.4574     Dynamic     GigabitEthernet 0/19     \n",
      "  12  F000.006C.67EE     Dynamic     GigabitEthernet 0/22     \n",
      "  12  F000.006C.8155     Dynamic     GigabitEthernet 0/22     \n",
      "  12  F000.006C.8167     Dynamic     GigabitEthernet 0/22     \n",
      "  12  F079.596C.908A     Dynamic     GigabitEthernet 0/17     \n",
      "  12  F4B5.2024.EBAF     Dynamic     GigabitEthernet 0/22     \n",
      "  12  F4B5.2024.EF6B     Dynamic     GigabitEthernet 0/17     \n",
      "  12  F4B5.2024.F19B     Dynamic     GigabitEthernet 0/22     \n",
      "  12  F4B5.2024.F365     Dynamic     GigabitEthernet 0/22     \n",
      "  12  F4B5.2024.F44C     Dynamic     GigabitEthernet 0/22     \n",
      "  12  F4B5.203B.1E44     Dynamic     GigabitEthernet 0/22     \n",
      "  12  F4B5.203B.1EEC     Dynamic     GigabitEthernet 0/17     \n",
      "  12  F4B5.203B.2404     Dynamic     GigabitEthernet 0/17     \n",
      "  12  FCAA.1422.A331     Dynamic     GigabitEthernet 0/22     \n",
      "  12  FCAA.1470.F02E     Dynamic     GigabitEthernet 0/17     \n",
      "  13  000C.294D.77F6     Dynamic     GigabitEthernet 0/46     \n",
      "  13  0017.6112.B286     Dynamic     GigabitEthernet 0/45     \n",
      "  13  00E0.FC09.BCF9     Dynamic     GigabitEthernet 0/33     \n",
      "  13  2CEA.7FEB.B118     Dynamic     GigabitEthernet 0/33     \n",
      "  13  2CEA.7FED.051C     Dynamic     GigabitEthernet 0/43     \n",
      "  13  80FB.06C9.6DB9     Dynamic     GigabitEthernet 0/33     \r\n",
      "\r",
      "  13  8CA6.DFC4.490D     Dynamic     GigabitEthernet 0/48     \n",
      "  13  9CA6.15D8.F7A2     Dynamic     GigabitEthernet 0/40     \n",
      "  13  F4B5.2018.50E7     Dynamic     GigabitEthernet 0/46     \n",
      "  13  F4EE.0823.956A     Dynamic     GigabitEthernet 0/44     \n"
     ]
    }
   ],
   "source": [
    "print(tabStr)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 393,
   "id": "b7aaafb8",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[['1', '0020.6BA3.4D7C', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '00D8.610C.3D58', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '00E0.0B48.A717', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '00E0.4C37.ACE4', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '00E0.4C3C.A0DB', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '00E0.4C52.032D', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '00E0.4C57.9160', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '00E0.4C85.826D', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '00E0.4CFF.2C14', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '00E0.4D95.1326', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '00E0.4F03.2E24', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '00E0.4F03.C582', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '00E0.7070.DE71', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '00E0.FC09.BCF9', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '0259.E77D.711A', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '0800.2740.3822', 'Dynamic', 'GigabitEthernet 0/4'], ['1', '0C9D.920F.C668', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '1012.FB7A.2656', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '18C0.4D1B.C69E', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '18C0.4DF8.7658', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '2428.FDC1.7333', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '2428.FDC1.7698', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '2428.FDC1.7699', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '2428.FDC1.76A4', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '2428.FDC1.76C7', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '2428.FDC1.76CC', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '2428.FDC1.76D0', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '2428.FDC1.76E4', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '2428.FDDC.BE9D', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '309C.2365.209E', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '309C.237D.6C73', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '309C.23B9.101A', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '408D.5C1D.9E3E', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '408D.5C8F.2ACA', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '408D.5CE7.408C', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '40B0.765F.6E47', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4419.B641.7795', 'Dynamic', 'GigabitEthernet 0/4'], ['1', '4419.B649.83AF', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4419.B649.8498', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4419.B649.8575', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4419.B649.85B6', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4419.B649.8609', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4419.B649.8619', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4419.B649.86FC', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4419.B649.86FD', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4419.B649.8705', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4419.B649.8706', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4419.B649.8709', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4419.B649.870A', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4419.B649.870F', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4419.B649.8714', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4419.B649.8716', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4419.B649.8717', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4419.B649.8718', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4419.B649.871C', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4419.B649.87DA', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4419.B649.87F4', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '44A6.42B6.C0A3', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CB0.0810.6C1E', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CBD.8F2C.9572', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CBD.8F2C.957C', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CBD.8F2C.9597', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CBD.8F79.1968', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CBD.8F79.19AC', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CBD.8F79.19CA', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CBD.8F79.1B2A', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CBD.8F79.1B53', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CBD.8F79.1B76', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CBD.8F79.1B7A', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CBD.8F79.1B80', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CBD.8F79.1B84', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CBD.8F90.6D54', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CBD.8F90.7198', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CBD.8F90.719C', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CBD.8F90.71A7', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CBD.8FBA.D012', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CBD.8FBA.D022', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CBD.8FCC.9024', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CBD.8FCC.90B6', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CBD.8FCC.90B8', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CBD.8FD3.2AA9', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CBD.8FD5.DA6E', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CBD.8FD5.DA70', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CBD.8FD5.DA71', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CBD.8FD5.DA85', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CBD.8FD5.DA95', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CBD.8FD5.DAB0', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CBD.8FD5.DAB2', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CBD.8FD5.DB1E', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CBD.8FD5.DBD4', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CED.FB41.FB44', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CED.FB41.FBA5', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CED.FB6C.EF9F', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CF5.DC97.3421', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CF5.DC97.343E', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CF5.DC97.344E', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CF5.DC97.3471', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CF5.DC97.35A9', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CF5.DC97.366E', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CF5.DC97.3677', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CF5.DC97.3695', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CF5.DC97.36B4', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '4CF5.DC9A.C39E', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '5475.959C.548B', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '5850.ED6D.2F60', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '5850.ED6D.2F7B', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '6045.CB7F.C902', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '686D.BCF6.0E91', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '70B5.E874.56E5', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '70B5.E874.5732', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '728A.A3BA.DA4F', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '7405.A563.FBA3', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '7427.EAE8.FEF9', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '7486.E218.0A99', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '7486.E218.1AFE', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '74D4.356D.891E', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '807C.6202.B8A1', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '807C.62BB.4E1E', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '80FB.06C9.6DB9', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '8220.C9C9.82B6', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '8469.9386.4585', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '849A.4059.B273', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '8630.12F1.DA35', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '8811.96AF.173E', 'Dynamic', 'GigabitEthernet 0/1'], ['1', '8CE7.486E.BF80', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'A85E.455A.5A7C', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'A85E.45A0.0ACE', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'A85E.45A0.0B0E', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'ACB9.2F24.2384', 'Dynamic', 'GigabitEthernet 0/3'], ['1', 'ACB9.2F46.05F5', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'ACCB.51DE.42E4', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'B42E.9904.6DDA', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'B42E.991D.4210', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'B42E.9944.2E6E', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'B42E.9968.3F8C', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'B42E.9968.4090', 'Dynamic', 'GigabitEthernet 0/4'], ['1', 'B42E.9971.29CD', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'B42E.9979.DE61', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'B42E.997A.2550', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'B42E.997A.2570', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'B42E.999D.1F99', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'B42E.99E6.329B', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'B42E.99E6.3C49', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'B83A.080E.F650', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'C051.7EA4.099F', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'C06D.ED2C.D964', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'D45D.6439.A7A3', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'E062.908D.9995', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'E062.90BB.C9B5', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'E062.90BB.DA7A', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'E0D5.5E51.EA27', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'E0D5.5E56.7EDB', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'E0D5.5E6D.BD23', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'E0D5.5EC3.191D', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'E0D5.5ED5.47EE', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'E0D5.5EFC.0288', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'E0D5.5EFC.0D5F', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'E86A.642E.0446', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'F000.003A.BEAB', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'F000.003A.BEAF', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'F000.003A.BEB3', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'F000.003A.BEC0', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'F000.003A.BEC5', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'F000.003B.4854', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'F000.003B.485D', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'F000.003B.487F', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'F000.003B.489A', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'F000.003B.48A1', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'F000.003B.4935', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'F000.003B.494A', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'F000.003F.58BF', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'F000.003F.669C', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'F079.596C.908A', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'F4B5.2024.EBAF', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'F4B5.2024.EF6B', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'F4B5.2024.F19B', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'F4B5.2024.F365', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'F4B5.2024.F44C', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'F4B5.203B.1E44', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'F4B5.203B.1EEC', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'F4B5.203B.2404', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'FCAA.1422.A331', 'Dynamic', 'GigabitEthernet 0/1'], ['1', 'FCAA.1470.F02E', 'Dynamic', 'GigabitEthernet 0/1'], ['12', '0017.6111.1AD0', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '0017.6112.279E', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '0017.6112.A93B', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '0017.6112.AB50', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '0020.6BA3.4D7C', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '00D8.610C.3D58', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '00E0.0B48.A717', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '00E0.4C37.ACE4', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '00E0.4C3C.A0DB', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '00E0.4C52.032D', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '00E0.4C57.9160', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '00E0.4C85.826D', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '00E0.4CFF.2C14', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '00E0.4D95.1326', 'Dynamic', 'GigabitEthernet 0/19'], ['12', '00E0.4F03.2E24', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '00E0.4F03.C582', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '00E0.7070.DE71', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '00E0.FC09.BCF9', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '020F.ED77.7960', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '0259.E77D.711A', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '0800.2740.3822', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '081F.7150.30DE', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '0840.F360.A0D8', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '0C9D.920F.C668', 'Dynamic', 'GigabitEthernet 0/19'], ['12', '1012.FB7A.2656', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '18C0.4D1B.C69E', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '18C0.4DF8.7658', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '2428.FDC1.7333', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '2428.FDC1.7698', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '2428.FDC1.7699', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '2428.FDC1.76A4', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '2428.FDC1.76C7', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '2428.FDC1.76CC', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '2428.FDC1.76D0', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '2428.FDC1.76E4', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '2428.FDDC.BE9D', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '24CF.24A4.2DA8', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '309C.2365.209E', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '309C.237D.6C73', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '309C.23B9.101A', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '408D.5C1D.9E3E', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '408D.5C8F.2ACA', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '408D.5CE7.408C', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '40B0.765F.6E47', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '4419.B641.7795', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '4419.B649.83AF', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '4419.B649.8498', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '4419.B649.8575', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '4419.B649.85B6', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '4419.B649.8609', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '4419.B649.8619', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '4419.B649.86FC', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '4419.B649.86FD', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '4419.B649.8705', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '4419.B649.8706', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '4419.B649.8709', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '4419.B649.870A', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '4419.B649.870F', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '4419.B649.8714', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '4419.B649.8716', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '4419.B649.8717', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '4419.B649.8718', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '4419.B649.871C', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '4419.B649.87DA', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '4419.B649.87F4', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '44A6.42B6.C0A3', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '4CB0.0810.6C1E', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '4CBD.8F2C.9572', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '4CBD.8F2C.957C', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '4CBD.8F2C.9597', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '4CBD.8F79.1968', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '4CBD.8F79.19AC', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '4CBD.8F79.19CA', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '4CBD.8F79.1B2A', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '4CBD.8F79.1B53', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '4CBD.8F79.1B76', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '4CBD.8F79.1B7A', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '4CBD.8F79.1B80', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '4CBD.8F79.1B84', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '4CBD.8F90.6D54', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '4CBD.8F90.7198', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '4CBD.8F90.719C', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '4CBD.8F90.71A7', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '4CBD.8FBA.D012', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '4CBD.8FBA.D022', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '4CBD.8FCC.9024', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '4CBD.8FCC.90B6', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '4CBD.8FCC.90B8', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '4CBD.8FD3.2AA9', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '4CBD.8FD5.DA6E', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '4CBD.8FD5.DA70', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '4CBD.8FD5.DA71', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '4CBD.8FD5.DA85', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '4CBD.8FD5.DA95', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '4CBD.8FD5.DAB0', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '4CBD.8FD5.DAB2', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '4CBD.8FD5.DB1E', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '4CBD.8FD5.DBD4', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '4CED.FB41.FB44', 'Dynamic', 'GigabitEthernet 0/19'], ['12', '4CED.FB41.FBA5', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '4CED.FB6C.EF9F', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '4CF5.DC97.3421', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '4CF5.DC97.343E', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '4CF5.DC97.344E', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '4CF5.DC97.3471', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '4CF5.DC97.35A9', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '4CF5.DC97.366E', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '4CF5.DC97.3677', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '4CF5.DC97.3695', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '4CF5.DC97.36B4', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '4CF5.DC9A.C39E', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '5475.959C.548B', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '5850.ED6D.2F60', 'Dynamic', 'GigabitEthernet 0/19'], ['12', '5850.ED6D.2F7B', 'Dynamic', 'GigabitEthernet 0/19'], ['12', '5CDE.34F7.014D', 'Dynamic', 'GigabitEthernet 0/19'], ['12', '6045.CB7F.C902', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '686D.BCF6.0E91', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '70B5.E874.4644', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '70B5.E874.56E5', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '70B5.E874.5732', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '70B5.E874.5844', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '728A.A3BA.DA4F', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '7405.A563.FBA3', 'Dynamic', 'GigabitEthernet 0/23'], ['12', '7427.EAE8.FEF9', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '7486.E218.0A99', 'Dynamic', 'GigabitEthernet 0/19'], ['12', '7486.E218.1AFE', 'Dynamic', 'GigabitEthernet 0/19'], ['12', '74D4.356D.891E', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '807C.6202.B8A1', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '807C.62BB.4E1E', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '80FB.06C9.6DB9', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '8220.C9C9.82B6', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '8269.C0E2.CBE1', 'Dynamic', 'GigabitEthernet 0/22'], ['12', '8469.9386.4585', 'Dynamic', 'GigabitEthernet 0/19'], ['12', '849A.4059.B273', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '8630.12F1.DA35', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '8811.96AF.173E', 'Dynamic', 'GigabitEthernet 0/17'], ['12', '8CE7.486E.BF80', 'Dynamic', 'GigabitEthernet 0/23'], ['12', 'A85E.455A.5A7C', 'Dynamic', 'GigabitEthernet 0/17'], ['12', 'A85E.45A0.0ACE', 'Dynamic', 'GigabitEthernet 0/17'], ['12', 'A85E.45A0.0B0E', 'Dynamic', 'GigabitEthernet 0/23'], ['12', 'ACB9.2F24.2384', 'Dynamic', 'GigabitEthernet 0/17'], ['12', 'ACB9.2F46.05F5', 'Dynamic', 'GigabitEthernet 0/17'], ['12', 'ACCB.51DE.42E4', 'Dynamic', 'GigabitEthernet 0/17'], ['12', 'B42E.9904.6DDA', 'Dynamic', 'GigabitEthernet 0/26'], ['12', 'B42E.991D.4210', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'B42E.9944.2E6E', 'Dynamic', 'GigabitEthernet 0/23'], ['12', 'B42E.9968.3F8C', 'Dynamic', 'GigabitEthernet 0/23'], ['12', 'B42E.9968.4090', 'Dynamic', 'GigabitEthernet 0/17'], ['12', 'B42E.9971.29CD', 'Dynamic', 'GigabitEthernet 0/17'], ['12', 'B42E.9979.DE61', 'Dynamic', 'GigabitEthernet 0/17'], ['12', 'B42E.997A.2550', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'B42E.997A.2570', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'B42E.999D.1F99', 'Dynamic', 'GigabitEthernet 0/17'], ['12', 'B42E.99E6.329B', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'B42E.99E6.3C49', 'Dynamic', 'GigabitEthernet 0/17'], ['12', 'B42E.99EA.043C', 'Dynamic', 'GigabitEthernet 0/23'], ['12', 'B83A.080E.F650', 'Dynamic', 'GigabitEthernet 0/17'], ['12', 'C051.7EA4.099F', 'Dynamic', 'GigabitEthernet 0/23'], ['12', 'C06D.ED2C.D964', 'Dynamic', 'GigabitEthernet 0/19'], ['12', 'D45D.6439.A7A3', 'Dynamic', 'GigabitEthernet 0/17'], ['12', 'E062.902F.E906', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'E062.9032.A966', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'E062.9082.2258', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'E062.9087.A15A', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'E062.908A.BDC9', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'E062.908D.9995', 'Dynamic', 'GigabitEthernet 0/23'], ['12', 'E062.90B0.4B6A', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'E062.90BB.C9B5', 'Dynamic', 'GigabitEthernet 0/23'], ['12', 'E062.90BB.DA7A', 'Dynamic', 'GigabitEthernet 0/23'], ['12', 'E062.90C9.1712', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'E062.90DD.0803', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'E062.90EB.0492', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'E062.90F6.66B9', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'E0D5.5E51.EA27', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'E0D5.5E56.7EDB', 'Dynamic', 'GigabitEthernet 0/17'], ['12', 'E0D5.5E6D.BD23', 'Dynamic', 'GigabitEthernet 0/26'], ['12', 'E0D5.5EC3.191D', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'E0D5.5ED5.47EE', 'Dynamic', 'GigabitEthernet 0/19'], ['12', 'E0D5.5EFC.0288', 'Dynamic', 'GigabitEthernet 0/23'], ['12', 'E0D5.5EFC.0D5F', 'Dynamic', 'GigabitEthernet 0/17'], ['12', 'E247.1F2C.0F6D', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'E86A.642E.0446', 'Dynamic', 'GigabitEthernet 0/17'], ['12', 'F000.003A.BEAB', 'Dynamic', 'GigabitEthernet 0/23'], ['12', 'F000.003A.BEAF', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'F000.003A.BEB3', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'F000.003A.BEC0', 'Dynamic', 'GigabitEthernet 0/23'], ['12', 'F000.003A.BEC5', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'F000.003A.BEE5', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'F000.003B.4854', 'Dynamic', 'GigabitEthernet 0/23'], ['12', 'F000.003B.485D', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'F000.003B.487F', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'F000.003B.489A', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'F000.003B.48A1', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'F000.003B.4935', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'F000.003B.494A', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'F000.003F.589E', 'Dynamic', 'GigabitEthernet 0/23'], ['12', 'F000.003F.58BF', 'Dynamic', 'GigabitEthernet 0/23'], ['12', 'F000.003F.64A8', 'Dynamic', 'GigabitEthernet 0/23'], ['12', 'F000.003F.669C', 'Dynamic', 'GigabitEthernet 0/23'], ['12', 'F000.006B.DA3E', 'Dynamic', 'GigabitEthernet 0/19'], ['12', 'F000.006C.4574', 'Dynamic', 'GigabitEthernet 0/19'], ['12', 'F000.006C.67EE', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'F000.006C.8155', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'F000.006C.8167', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'F079.596C.908A', 'Dynamic', 'GigabitEthernet 0/17'], ['12', 'F4B5.2024.EBAF', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'F4B5.2024.EF6B', 'Dynamic', 'GigabitEthernet 0/17'], ['12', 'F4B5.2024.F19B', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'F4B5.2024.F365', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'F4B5.2024.F44C', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'F4B5.203B.1E44', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'F4B5.203B.1EEC', 'Dynamic', 'GigabitEthernet 0/17'], ['12', 'F4B5.203B.2404', 'Dynamic', 'GigabitEthernet 0/17'], ['12', 'FCAA.1422.A331', 'Dynamic', 'GigabitEthernet 0/22'], ['12', 'FCAA.1470.F02E', 'Dynamic', 'GigabitEthernet 0/17'], ['13', '000C.294D.77F6', 'Dynamic', 'GigabitEthernet 0/46'], ['13', '0017.6112.B286', 'Dynamic', 'GigabitEthernet 0/45'], ['13', '00E0.FC09.BCF9', 'Dynamic', 'GigabitEthernet 0/33'], ['13', '2CEA.7FEB.B118', 'Dynamic', 'GigabitEthernet 0/33'], ['13', '2CEA.7FED.051C', 'Dynamic', 'GigabitEthernet 0/43'], ['13', '80FB.06C9.6DB9', 'Dynamic', 'GigabitEthernet 0/33'], ['13', '8CA6.DFC4.490D', 'Dynamic', 'GigabitEthernet 0/48'], ['13', '9CA6.15D8.F7A2', 'Dynamic', 'GigabitEthernet 0/40'], ['13', 'F4B5.2018.50E7', 'Dynamic', 'GigabitEthernet 0/46'], ['13', 'F4EE.0823.956A', 'Dynamic', 'GigabitEthernet 0/44']]\n"
     ]
    }
   ],
   "source": [
    "\n",
    "\n",
    "output = '''\n",
    "12  00E0.4C57.9160     Dynamic     GigabitEthernet 0/17     \n",
    "  12  00E0.4C85.826D     Dynamic     GigabitEthernet 0/23     \n",
    "  12  00E0.4CFF.2C14     Dynamic     GigabitEthernet 0/22     \n",
    "  12  00E0.4D95.1326     Dynamic     GigabitEthernet 0/19     \n",
    "  12  00E0.4F03.2E24     Dynamic     GigabitEthernet 0/23     \n",
    "  12  00E0.4F03.C582     Dynamic     GigabitEthernet 0/22     \n",
    "  12  00E0.7070.DE71     Dynamic     GigabitEthernet 0/23     \n",
    "  12  00E0.FC09.BCF9     Dynamic     GigabitEthernet 0/17     \n",
    "  12  0259.E77D.711A     Dynamic     GigabitEthernet 0/17     \n",
    "  12  0800.2740.3822     Dynamic     GigabitEthernet 0/17     \n",
    "  12  081F.7150.30DE     Dynamic     GigabitEthernet 0/22     \n",
    "  12  0840.F360.A0D8     Dynamic     GigabitEthernet 0/22        \n",
    "'''\n",
    "\n",
    "f = open('show-mac.template')\n",
    "template = TextFSM(f)\n",
    "outTab = template.ParseText(tabStr)\n",
    "print (outTab)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 394,
   "id": "20902fdb",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "408"
      ]
     },
     "execution_count": 394,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "len(outTab)"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "660823ee",
   "metadata": {},
   "source": [
    "### 任意读取"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 11,
   "id": "a5ac3ac7",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "''"
      ]
     },
     "execution_count": 11,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "out = tn.read_very_eager().decode('ascii')#读取缓冲区内的数据不等待\n",
    "out"
   ]
  },
  {
   "cell_type": "markdown",
   "id": "7e9cbb9f",
   "metadata": {},
   "source": [
    "### 关闭连接\n"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 221,
   "id": "89f800a3",
   "metadata": {},
   "outputs": [],
   "source": [
    "\n",
    "tn.close()"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "c2f89d68",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "13e66494",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "e8c1c994",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "d309411d",
   "metadata": {},
   "outputs": [],
   "source": []
  },
  {
   "cell_type": "code",
   "execution_count": 44,
   "id": "65f3e6cb",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "[\n",
      "    [\n",
      "        \"00e0-4c37-ace4\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"e0d5-5ef7-0e13\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"00e0-4cff-2c14\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"7427-eae8-fef9\",\n",
      "        \"15\",\n",
      "        \"Eth0/0/5\"\n",
      "    ],\n",
      "    [\n",
      "        \"acb9-2f24-2384\",\n",
      "        \"88\",\n",
      "        \"Eth0/0/1\"\n",
      "    ],\n",
      "    [\n",
      "        \"e0d5-5e56-7edb\",\n",
      "        \"17\",\n",
      "        \"Eth0/0/7\"\n",
      "    ],\n",
      "    [\n",
      "        \"5cde-3414-a887\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/13\"\n",
      "    ],\n",
      "    [\n",
      "        \"f4b5-203b-2404\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/16\"\n",
      "    ],\n",
      "    [\n",
      "        \"70b5-e874-5844\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"b42e-9904-6dda\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f4b5-2024-f44c\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-006c-8155\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-006c-8167\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"b42e-99e6-3c49\",\n",
      "        \"15\",\n",
      "        \"Eth0/0/5\"\n",
      "    ],\n",
      "    [\n",
      "        \"e062-9087-a15a\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-83af\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"00e0-4f03-2e24\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"6045-cb7f-c902\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"e247-1f2c-0f6d\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"b42e-999d-1f99\",\n",
      "        \"15\",\n",
      "        \"Eth0/0/5\"\n",
      "    ],\n",
      "    [\n",
      "        \"8469-9386-4585\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"2cea-7feb-b118\",\n",
      "        \"100\",\n",
      "        \"Eth0/0/20\"\n",
      "    ],\n",
      "    [\n",
      "        \"e062-9082-2258\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"408d-5c1d-9e3e\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8f90-71a7\",\n",
      "        \"88\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"0c9d-92cc-8c94\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/16\"\n",
      "    ],\n",
      "    [\n",
      "        \"b42e-9968-3f8c\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8f90-719c\",\n",
      "        \"88\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8f90-7198\",\n",
      "        \"88\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8fba-d022\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"b42e-9944-2e6e\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"b42e-9979-de61\",\n",
      "        \"17\",\n",
      "        \"Eth0/0/7\"\n",
      "    ],\n",
      "    [\n",
      "        \"309c-23b9-101a\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8fba-d012\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"e0d5-5efc-0d5f\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/15\"\n",
      "    ],\n",
      "    [\n",
      "        \"309c-2365-209e\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8fcc-9024\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"e0d5-5e6d-bd23\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8fcc-90b6\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/13\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cf5-dc9a-c39e\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8fcc-90b8\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"c06d-ed2c-d964\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cf5-dc97-3471\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"f4b5-2018-50e7\",\n",
      "        \"100\",\n",
      "        \"Eth0/0/24\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cf5-dc97-344e\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/15\"\n",
      "    ],\n",
      "    [\n",
      "        \"e062-90eb-0492\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cf5-dc97-343e\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/15\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cf5-dc97-3421\",\n",
      "        \"17\",\n",
      "        \"Eth0/0/7\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-8619\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-8609\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"e0d5-5e51-ea27\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"b42e-9971-29cd\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/16\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-86fc\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-86fd\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003f-64a8\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003f-64aa\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"e40c-fdb5-8d5f\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"f4b5-2024-f19b\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"e0d5-5efa-1b79\",\n",
      "        \"100\",\n",
      "        \"Eth0/0/24\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-006c-4574\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"5475-959c-548b\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-8716\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-8717\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-8714\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-8718\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-871c\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-8706\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-8705\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-870a\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-8709\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-870f\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-87f4\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-87da\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b641-7795\",\n",
      "        \"11\",\n",
      "        \"Eth0/0/1\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cf5-dc97-35a9\",\n",
      "        \"17\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cf5-dc97-3677\",\n",
      "        \"17\",\n",
      "        \"Eth0/0/7\"\n",
      "    ],\n",
      "    [\n",
      "        \"e062-90f6-66b9\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cf5-dc97-366e\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/15\"\n",
      "    ],\n",
      "    [\n",
      "        \"acb9-2f46-05f5\",\n",
      "        \"17\",\n",
      "        \"Eth0/0/7\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8f2c-9597\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"0c82-6858-7222\",\n",
      "        \"200\",\n",
      "        \"GE0/0/3\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-006c-6648\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/15\"\n",
      "    ],\n",
      "    [\n",
      "        \"d258-42b8-7696\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"b83a-080e-f650\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"2cea-7fed-051c\",\n",
      "        \"100\",\n",
      "        \"Eth0/0/24\"\n",
      "    ],\n",
      "    [\n",
      "        \"849a-4059-b273\",\n",
      "        \"17\",\n",
      "        \"Eth0/0/7\"\n",
      "    ],\n",
      "    [\n",
      "        \"44a6-42b6-c0a3\",\n",
      "        \"17\",\n",
      "        \"Eth0/0/7\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003f-669d\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/15\"\n",
      "    ],\n",
      "    [\n",
      "        \"0017-6112-279e\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"0017-6112-27a1\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/13\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8f2c-9572\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cf5-dc97-36b4\",\n",
      "        \"17\",\n",
      "        \"Eth0/0/7\"\n",
      "    ],\n",
      "    [\n",
      "        \"408d-5c8f-2aca\",\n",
      "        \"15\",\n",
      "        \"Eth0/0/5\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8f2c-957c\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"a85e-45a0-0b0e\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cf5-dc97-3695\",\n",
      "        \"17\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-8498\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"0020-6ba3-4d7c\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003f-669c\",\n",
      "        \"87\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-8575\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"a85e-45a0-0ace\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"e0d5-5ec3-191d\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"c051-7ea4-099f\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"0800-2740-3822\",\n",
      "        \"11\",\n",
      "        \"Eth0/0/1\"\n",
      "    ],\n",
      "    [\n",
      "        \"a85e-455a-5a7c\",\n",
      "        \"17\",\n",
      "        \"Eth0/0/7\"\n",
      "    ],\n",
      "    [\n",
      "        \"2428-fddc-be9d\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/13\"\n",
      "    ],\n",
      "    [\n",
      "        \"e062-90c9-1712\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-006c-67ee\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4419-b649-85b6\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"d45d-6439-a7a3\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"f4b5-2024-f365\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"b42e-997a-2570\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4ced-fb6c-ef9f\",\n",
      "        \"15\",\n",
      "        \"Eth0/0/5\"\n",
      "    ],\n",
      "    [\n",
      "        \"e86a-642e-0446\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"0017-6112-a93b\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"b42e-997a-2550\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003b-485d\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003b-4854\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8fd5-db1e\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f46d-2fcf-c3ed\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8f79-1b84\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003b-487f\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8f79-1b80\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-006c-6811\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/15\"\n",
      "    ],\n",
      "    [\n",
      "        \"6461-4046-fc4d\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/13\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003f-589e\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003b-489a\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"74d4-356d-891e\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8f79-1b76\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8f79-1b7a\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8fd5-dbd4\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"e062-90dd-0803\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cb0-0810-6c1e\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/13\"\n",
      "    ],\n",
      "    [\n",
      "        \"8ca6-df43-6b43\",\n",
      "        \"15\",\n",
      "        \"Eth0/0/5\"\n",
      "    ],\n",
      "    [\n",
      "        \"40b0-765f-6e47\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/16\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8f79-1b53\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003b-48a1\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8f79-1b2a\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003f-58bf\",\n",
      "        \"87\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"fcaa-1470-f02e\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/16\"\n",
      "    ],\n",
      "    [\n",
      "        \"0c9d-920f-c668\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8fd5-da71\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/13\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003b-4931\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/15\"\n",
      "    ],\n",
      "    [\n",
      "        \"e062-9032-a966\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8fd5-da6e\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003b-4935\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8fd5-da70\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"5cde-34f7-014d\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"8220-c9c9-82b6\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"e062-90bb-c9b5\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003b-494a\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"e062-908d-9995\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"8269-c0e2-cbe1\",\n",
      "        \"14\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"e062-902f-e906\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"081f-7130-405c\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/13\"\n",
      "    ],\n",
      "    [\n",
      "        \"0030-1bba-02db\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"fcaa-140d-3103\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f079-596c-908a\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"8811-96af-173e\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"081f-7150-30de\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f4ee-0823-956a\",\n",
      "        \"100\",\n",
      "        \"Eth0/0/24\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8fd5-da85\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"b42e-99ea-043c\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8fd5-da95\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8fd3-2aa9\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8fd5-dab2\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8fd5-dab0\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"8ca6-dfc4-490d\",\n",
      "        \"100\",\n",
      "        \"Eth0/0/24\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8f79-19ca\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"00e0-4f03-c582\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8f79-19ac\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"686d-bcf6-0e91\",\n",
      "        \"88\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"5850-ed6d-2f7b\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"0017-6112-ab50\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-006b-da3e\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f4b5-203b-1eec\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/16\"\n",
      "    ],\n",
      "    [\n",
      "        \"5850-ed6d-2f60\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"e062-90bb-da7a\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8f79-1968\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"2428-fdc1-7333\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/13\"\n",
      "    ],\n",
      "    [\n",
      "        \"807c-6202-b8a1\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/13\"\n",
      "    ],\n",
      "    [\n",
      "        \"7405-a563-fba3\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f4b5-203b-1e44\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"8ce7-486e-bf80\",\n",
      "        \"87\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"728a-a3ba-da4f\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"408d-5cfd-e739\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"e062-90b0-4b6a\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"fcaa-1422-a331\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"0840-f360-a0d8\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f4b5-2024-ef6b\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/16\"\n",
      "    ],\n",
      "    [\n",
      "        \"0017-6111-1ad0\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4ced-fb41-fba5\",\n",
      "        \"15\",\n",
      "        \"Eth0/0/5\"\n",
      "    ],\n",
      "    [\n",
      "        \"00e0-4c3c-a0db\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/16\"\n",
      "    ],\n",
      "    [\n",
      "        \"7486-e218-0a99\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"7486-e218-1afe\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"e0d5-5efc-0288\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"4ced-fb41-fb44\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"807c-62bb-4e1e\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"408d-5ce7-408c\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/16\"\n",
      "    ],\n",
      "    [\n",
      "        \"e062-908a-bdc9\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"1012-fb7a-2656\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/13\"\n",
      "    ],\n",
      "    [\n",
      "        \"94d9-b36c-2a90\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/16\"\n",
      "    ],\n",
      "    [\n",
      "        \"00e0-4c57-9160\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"b42e-9968-4090\",\n",
      "        \"11\",\n",
      "        \"Eth0/0/1\"\n",
      "    ],\n",
      "    [\n",
      "        \"24cf-24a4-2da8\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"00e0-4c85-826d\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"70b5-e874-56e5\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/16\"\n",
      "    ],\n",
      "    [\n",
      "        \"4cbd-8f90-6d54\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/13\"\n",
      "    ],\n",
      "    [\n",
      "        \"00e0-4d95-1326\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003a-beb3\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003a-beab\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003a-beaf\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"9ca6-15d8-f7a2\",\n",
      "        \"100\",\n",
      "        \"Eth0/0/24\"\n",
      "    ],\n",
      "    [\n",
      "        \"00e0-7070-de71\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"000c-294d-77f6\",\n",
      "        \"100\",\n",
      "        \"Eth0/0/24\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003a-bec0\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003a-bec5\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"8630-12f1-da35\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"f000-003a-bee5\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"b42e-991d-4210\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"2428-fdc1-76a4\",\n",
      "        \"88\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"2428-fdc1-76e4\",\n",
      "        \"20\",\n",
      "        \"Eth0/0/9\"\n",
      "    ],\n",
      "    [\n",
      "        \"2428-fdc1-76d0\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"f4b5-2024-ebaf\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"2428-fdc1-76c7\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/13\"\n",
      "    ],\n",
      "    [\n",
      "        \"2428-fdc1-76cc\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/13\"\n",
      "    ],\n",
      "    [\n",
      "        \"2428-fdc1-7699\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/15\"\n",
      "    ],\n",
      "    [\n",
      "        \"2428-fdc1-7698\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/13\"\n",
      "    ],\n",
      "    [\n",
      "        \"b42e-99e6-329b\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"00e0-4c52-032d\",\n",
      "        \"17\",\n",
      "        \"Eth0/0/7\"\n",
      "    ],\n",
      "    [\n",
      "        \"309c-237d-6c73\",\n",
      "        \"34\",\n",
      "        \"Eth0/0/11\"\n",
      "    ],\n",
      "    [\n",
      "        \"accb-51de-42e4\",\n",
      "        \"26\",\n",
      "        \"Eth0/0/15\"\n",
      "    ],\n",
      "    [\n",
      "        \"70b5-e874-5732\",\n",
      "        \"15\",\n",
      "        \"Eth0/0/5\"\n",
      "    ]\n",
      "]\n"
     ]
    }
   ],
   "source": [
    "tmp = json.dumps(outTab, sort_keys=True, indent=4, separators=(',', ': '))\n",
    "print(tmp)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 43,
   "id": "ef4a8230",
   "metadata": {},
   "outputs": [
    {
     "data": {
      "text/plain": [
       "100"
      ]
     },
     "execution_count": 43,
     "metadata": {},
     "output_type": "execute_result"
    }
   ],
   "source": [
    "int('100')"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": 46,
   "id": "e44452fd",
   "metadata": {},
   "outputs": [
    {
     "name": "stdout",
     "output_type": "stream",
     "text": [
      "{'mac': '00e0-4c37-ace4', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'e0d5-5ef7-0e13', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': '00e0-4cff-2c14', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '7427-eae8-fef9', 'vlan': '15', 'port': 'Eth0/0/5'}\n",
      "{'mac': 'acb9-2f24-2384', 'vlan': '88', 'port': 'Eth0/0/1'}\n",
      "{'mac': 'e0d5-5e56-7edb', 'vlan': '17', 'port': 'Eth0/0/7'}\n",
      "{'mac': '5cde-3414-a887', 'vlan': '26', 'port': 'Eth0/0/13'}\n",
      "{'mac': 'f4b5-203b-2404', 'vlan': '26', 'port': 'Eth0/0/16'}\n",
      "{'mac': '70b5-e874-5844', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'b42e-9904-6dda', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f4b5-2024-f44c', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-006c-8155', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-006c-8167', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'b42e-99e6-3c49', 'vlan': '15', 'port': 'Eth0/0/5'}\n",
      "{'mac': 'e062-9087-a15a', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-83af', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '00e0-4f03-2e24', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '6045-cb7f-c902', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'e247-1f2c-0f6d', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'b42e-999d-1f99', 'vlan': '15', 'port': 'Eth0/0/5'}\n",
      "{'mac': '8469-9386-4585', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '2cea-7feb-b118', 'vlan': '100', 'port': 'Eth0/0/20'}\n",
      "{'mac': 'e062-9082-2258', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '408d-5c1d-9e3e', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': '4cbd-8f90-71a7', 'vlan': '88', 'port': 'Eth0/0/11'}\n",
      "{'mac': '0c9d-92cc-8c94', 'vlan': '26', 'port': 'Eth0/0/16'}\n",
      "{'mac': 'b42e-9968-3f8c', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8f90-719c', 'vlan': '88', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8f90-7198', 'vlan': '88', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8fba-d022', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'b42e-9944-2e6e', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'b42e-9979-de61', 'vlan': '17', 'port': 'Eth0/0/7'}\n",
      "{'mac': '309c-23b9-101a', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': '4cbd-8fba-d012', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'e0d5-5efc-0d5f', 'vlan': '26', 'port': 'Eth0/0/15'}\n",
      "{'mac': '309c-2365-209e', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': '4cbd-8fcc-9024', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'e0d5-5e6d-bd23', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8fcc-90b6', 'vlan': '26', 'port': 'Eth0/0/13'}\n",
      "{'mac': '4cf5-dc9a-c39e', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': '4cbd-8fcc-90b8', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'c06d-ed2c-d964', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cf5-dc97-3471', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': 'f4b5-2018-50e7', 'vlan': '100', 'port': 'Eth0/0/24'}\n",
      "{'mac': '4cf5-dc97-344e', 'vlan': '26', 'port': 'Eth0/0/15'}\n",
      "{'mac': 'e062-90eb-0492', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cf5-dc97-343e', 'vlan': '26', 'port': 'Eth0/0/15'}\n",
      "{'mac': '4cf5-dc97-3421', 'vlan': '17', 'port': 'Eth0/0/7'}\n",
      "{'mac': '4419-b649-8619', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-8609', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'e0d5-5e51-ea27', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'b42e-9971-29cd', 'vlan': '26', 'port': 'Eth0/0/16'}\n",
      "{'mac': '4419-b649-86fc', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-86fd', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-003f-64a8', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-003f-64aa', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'e40c-fdb5-8d5f', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': 'f4b5-2024-f19b', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'e0d5-5efa-1b79', 'vlan': '100', 'port': 'Eth0/0/24'}\n",
      "{'mac': 'f000-006c-4574', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '5475-959c-548b', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-8716', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-8717', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-8714', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-8718', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-871c', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-8706', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-8705', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-870a', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-8709', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-870f', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-87f4', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-87da', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b641-7795', 'vlan': '11', 'port': 'Eth0/0/1'}\n",
      "{'mac': '4cf5-dc97-35a9', 'vlan': '17', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cf5-dc97-3677', 'vlan': '17', 'port': 'Eth0/0/7'}\n",
      "{'mac': 'e062-90f6-66b9', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cf5-dc97-366e', 'vlan': '26', 'port': 'Eth0/0/15'}\n",
      "{'mac': 'acb9-2f46-05f5', 'vlan': '17', 'port': 'Eth0/0/7'}\n",
      "{'mac': '4cbd-8f2c-9597', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '0c82-6858-7222', 'vlan': '200', 'port': 'GE0/0/3'}\n",
      "{'mac': 'f000-006c-6648', 'vlan': '26', 'port': 'Eth0/0/15'}\n",
      "{'mac': 'd258-42b8-7696', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': 'b83a-080e-f650', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': '2cea-7fed-051c', 'vlan': '100', 'port': 'Eth0/0/24'}\n",
      "{'mac': '849a-4059-b273', 'vlan': '17', 'port': 'Eth0/0/7'}\n",
      "{'mac': '44a6-42b6-c0a3', 'vlan': '17', 'port': 'Eth0/0/7'}\n",
      "{'mac': 'f000-003f-669d', 'vlan': '26', 'port': 'Eth0/0/15'}\n",
      "{'mac': '0017-6112-279e', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '0017-6112-27a1', 'vlan': '26', 'port': 'Eth0/0/13'}\n",
      "{'mac': '4cbd-8f2c-9572', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cf5-dc97-36b4', 'vlan': '17', 'port': 'Eth0/0/7'}\n",
      "{'mac': '408d-5c8f-2aca', 'vlan': '15', 'port': 'Eth0/0/5'}\n",
      "{'mac': '4cbd-8f2c-957c', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'a85e-45a0-0b0e', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cf5-dc97-3695', 'vlan': '17', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-8498', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '0020-6ba3-4d7c', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': 'f000-003f-669c', 'vlan': '87', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-8575', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'a85e-45a0-0ace', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': 'e0d5-5ec3-191d', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'c051-7ea4-099f', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '0800-2740-3822', 'vlan': '11', 'port': 'Eth0/0/1'}\n",
      "{'mac': 'a85e-455a-5a7c', 'vlan': '17', 'port': 'Eth0/0/7'}\n",
      "{'mac': '2428-fddc-be9d', 'vlan': '26', 'port': 'Eth0/0/13'}\n",
      "{'mac': 'e062-90c9-1712', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-006c-67ee', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4419-b649-85b6', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'd45d-6439-a7a3', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': 'f4b5-2024-f365', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'b42e-997a-2570', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4ced-fb6c-ef9f', 'vlan': '15', 'port': 'Eth0/0/5'}\n",
      "{'mac': 'e86a-642e-0446', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': '0017-6112-a93b', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'b42e-997a-2550', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-003b-485d', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-003b-4854', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8fd5-db1e', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f46d-2fcf-c3ed', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': '4cbd-8f79-1b84', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-003b-487f', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8f79-1b80', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-006c-6811', 'vlan': '26', 'port': 'Eth0/0/15'}\n",
      "{'mac': '6461-4046-fc4d', 'vlan': '26', 'port': 'Eth0/0/13'}\n",
      "{'mac': 'f000-003f-589e', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-003b-489a', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '74d4-356d-891e', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8f79-1b76', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8f79-1b7a', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8fd5-dbd4', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'e062-90dd-0803', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cb0-0810-6c1e', 'vlan': '26', 'port': 'Eth0/0/13'}\n",
      "{'mac': '8ca6-df43-6b43', 'vlan': '15', 'port': 'Eth0/0/5'}\n",
      "{'mac': '40b0-765f-6e47', 'vlan': '26', 'port': 'Eth0/0/16'}\n",
      "{'mac': '4cbd-8f79-1b53', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-003b-48a1', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8f79-1b2a', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-003f-58bf', 'vlan': '87', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'fcaa-1470-f02e', 'vlan': '26', 'port': 'Eth0/0/16'}\n",
      "{'mac': '0c9d-920f-c668', 'vlan': '20', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8fd5-da71', 'vlan': '26', 'port': 'Eth0/0/13'}\n",
      "{'mac': 'f000-003b-4931', 'vlan': '26', 'port': 'Eth0/0/15'}\n",
      "{'mac': 'e062-9032-a966', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8fd5-da6e', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-003b-4935', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8fd5-da70', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '5cde-34f7-014d', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '8220-c9c9-82b6', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': 'e062-90bb-c9b5', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-003b-494a', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'e062-908d-9995', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '8269-c0e2-cbe1', 'vlan': '14', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'e062-902f-e906', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '081f-7130-405c', 'vlan': '26', 'port': 'Eth0/0/13'}\n",
      "{'mac': '0030-1bba-02db', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'fcaa-140d-3103', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f079-596c-908a', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': '8811-96af-173e', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': '081f-7150-30de', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f4ee-0823-956a', 'vlan': '100', 'port': 'Eth0/0/24'}\n",
      "{'mac': '4cbd-8fd5-da85', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'b42e-99ea-043c', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8fd5-da95', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8fd3-2aa9', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8fd5-dab2', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8fd5-dab0', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '8ca6-dfc4-490d', 'vlan': '100', 'port': 'Eth0/0/24'}\n",
      "{'mac': '4cbd-8f79-19ca', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '00e0-4f03-c582', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8f79-19ac', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '686d-bcf6-0e91', 'vlan': '88', 'port': 'Eth0/0/11'}\n",
      "{'mac': '5850-ed6d-2f7b', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '0017-6112-ab50', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-006b-da3e', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f4b5-203b-1eec', 'vlan': '26', 'port': 'Eth0/0/16'}\n",
      "{'mac': '5850-ed6d-2f60', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'e062-90bb-da7a', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4cbd-8f79-1968', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '2428-fdc1-7333', 'vlan': '26', 'port': 'Eth0/0/13'}\n",
      "{'mac': '807c-6202-b8a1', 'vlan': '26', 'port': 'Eth0/0/13'}\n",
      "{'mac': '7405-a563-fba3', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f4b5-203b-1e44', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '8ce7-486e-bf80', 'vlan': '87', 'port': 'Eth0/0/11'}\n",
      "{'mac': '728a-a3ba-da4f', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': '408d-5cfd-e739', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'e062-90b0-4b6a', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'fcaa-1422-a331', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '0840-f360-a0d8', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f4b5-2024-ef6b', 'vlan': '26', 'port': 'Eth0/0/16'}\n",
      "{'mac': '0017-6111-1ad0', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4ced-fb41-fba5', 'vlan': '15', 'port': 'Eth0/0/5'}\n",
      "{'mac': '00e0-4c3c-a0db', 'vlan': '26', 'port': 'Eth0/0/16'}\n",
      "{'mac': '7486-e218-0a99', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '7486-e218-1afe', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'e0d5-5efc-0288', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '4ced-fb41-fb44', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '807c-62bb-4e1e', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': '408d-5ce7-408c', 'vlan': '26', 'port': 'Eth0/0/16'}\n",
      "{'mac': 'e062-908a-bdc9', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '1012-fb7a-2656', 'vlan': '26', 'port': 'Eth0/0/13'}\n",
      "{'mac': '94d9-b36c-2a90', 'vlan': '26', 'port': 'Eth0/0/16'}\n",
      "{'mac': '00e0-4c57-9160', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': 'b42e-9968-4090', 'vlan': '11', 'port': 'Eth0/0/1'}\n",
      "{'mac': '24cf-24a4-2da8', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '00e0-4c85-826d', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '70b5-e874-56e5', 'vlan': '26', 'port': 'Eth0/0/16'}\n",
      "{'mac': '4cbd-8f90-6d54', 'vlan': '26', 'port': 'Eth0/0/13'}\n",
      "{'mac': '00e0-4d95-1326', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-003a-beb3', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-003a-beab', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-003a-beaf', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '9ca6-15d8-f7a2', 'vlan': '100', 'port': 'Eth0/0/24'}\n",
      "{'mac': '00e0-7070-de71', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '000c-294d-77f6', 'vlan': '100', 'port': 'Eth0/0/24'}\n",
      "{'mac': 'f000-003a-bec0', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f000-003a-bec5', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '8630-12f1-da35', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': 'f000-003a-bee5', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'b42e-991d-4210', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '2428-fdc1-76a4', 'vlan': '88', 'port': 'Eth0/0/11'}\n",
      "{'mac': '2428-fdc1-76e4', 'vlan': '20', 'port': 'Eth0/0/9'}\n",
      "{'mac': '2428-fdc1-76d0', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'f4b5-2024-ebaf', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '2428-fdc1-76c7', 'vlan': '26', 'port': 'Eth0/0/13'}\n",
      "{'mac': '2428-fdc1-76cc', 'vlan': '26', 'port': 'Eth0/0/13'}\n",
      "{'mac': '2428-fdc1-7699', 'vlan': '26', 'port': 'Eth0/0/15'}\n",
      "{'mac': '2428-fdc1-7698', 'vlan': '26', 'port': 'Eth0/0/13'}\n",
      "{'mac': 'b42e-99e6-329b', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': '00e0-4c52-032d', 'vlan': '17', 'port': 'Eth0/0/7'}\n",
      "{'mac': '309c-237d-6c73', 'vlan': '34', 'port': 'Eth0/0/11'}\n",
      "{'mac': 'accb-51de-42e4', 'vlan': '26', 'port': 'Eth0/0/15'}\n",
      "{'mac': '70b5-e874-5732', 'vlan': '15', 'port': 'Eth0/0/5'}\n"
     ]
    }
   ],
   "source": [
    "for row in outTab:\n",
    "\n",
    "\n",
    "    keys = ['mac', 'vlan', 'port']\n",
    "\n",
    "    dictionary = dict(zip(keys, row))\n",
    "    print(dictionary)"
   ]
  },
  {
   "cell_type": "code",
   "execution_count": null,
   "id": "93d4d273",
   "metadata": {},
   "outputs": [],
   "source": []
  }
 ],
 "metadata": {
  "kernelspec": {
   "display_name": "Python 3 (ipykernel)",
   "language": "python",
   "name": "python3"
  },
  "language_info": {
   "codemirror_mode": {
    "name": "ipython",
    "version": 3
   },
   "file_extension": ".py",
   "mimetype": "text/x-python",
   "name": "python",
   "nbconvert_exporter": "python",
   "pygments_lexer": "ipython3",
   "version": "3.10.9"
  }
 },
 "nbformat": 4,
 "nbformat_minor": 5
}
